Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Aishwaryazanpur
Frequent Visitor

Multiple Columns cannot be converted in to a single Value

Dear PBI Community,

 

I want to calculate productivity value (Screen shot 1 , measure in my report) based on the highlighted "selected FY "  ( year that user will select from filter ..the screen shot 2 below shows details / calculations of  measure selected FY 

Screenshot 1 :

 

Productivity = DIVIDE(SUM('ReportingData V_ATLAS_OL'[Picked lines (total)]), SUM('ReportingData V_ATLAS_OL'[Productive hours]), FILTER('ReportingData V_ATLAS_OL', 'ReportingData V_ATLAS_OL'[FYDate Y] = [Selected FY]))
 

Screen shot 2 :

Selected FY = SELECTEDVALUE('ReportingData V_DIM_Dates'[FYDate Y])
 
NOTE : Table V_Atlas_OL & DIM-Dates arent connected
 

I am getting the following error, please help°!!

Multiple Columns cannot be converted in to a Single Value

 

 

 

 

1 ACCEPTED SOLUTION
johnbasha33
Solution Sage
Solution Sage

@Aishwaryazanpur 

The error message "Multiple Columns cannot be converted into a Single Value" typically occurs when a DAX function expects a single value but receives multiple values instead. In your case, it seems like the error is related to the use of the [Selected FY] measure within the FILTER function of your Productivity measure.

To resolve this issue, you can try using the VALUES function inside the FILTER to ensure that only a single value is passed to the filter context. Here's how you can modify your Productivity measure:

```dax
Productivity =
DIVIDE(
SUM('ReportingData V_ATLAS_OL'[Picked lines (total)]),
SUM('ReportingData V_ATLAS_OL'[Productive hours]),
FILTER(
'ReportingData V_ATLAS_OL',
'ReportingData V_ATLAS_OL'[FYDate Y] = VALUES('ReportingData V_DIM_Dates'[FYDate Y])
)
)
```

By using the VALUES function inside the FILTER, you ensure that only a single value from the 'ReportingData V_DIM_Dates'[FYDate Y] column is passed to the filter context, resolving the error related to multiple columns being converted into a single value.

Please replace 'ReportingData V_DIM_Dates'[FYDate Y] with the appropriate column reference from your 'DIM-Dates' table. This modification should help resolve the error you're encountering. If you continue to experience issues, feel free to provide additional details, and I'll be glad to assist you further!

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

View solution in original post

1 REPLY 1
johnbasha33
Solution Sage
Solution Sage

@Aishwaryazanpur 

The error message "Multiple Columns cannot be converted into a Single Value" typically occurs when a DAX function expects a single value but receives multiple values instead. In your case, it seems like the error is related to the use of the [Selected FY] measure within the FILTER function of your Productivity measure.

To resolve this issue, you can try using the VALUES function inside the FILTER to ensure that only a single value is passed to the filter context. Here's how you can modify your Productivity measure:

```dax
Productivity =
DIVIDE(
SUM('ReportingData V_ATLAS_OL'[Picked lines (total)]),
SUM('ReportingData V_ATLAS_OL'[Productive hours]),
FILTER(
'ReportingData V_ATLAS_OL',
'ReportingData V_ATLAS_OL'[FYDate Y] = VALUES('ReportingData V_DIM_Dates'[FYDate Y])
)
)
```

By using the VALUES function inside the FILTER, you ensure that only a single value from the 'ReportingData V_DIM_Dates'[FYDate Y] column is passed to the filter context, resolving the error related to multiple columns being converted into a single value.

Please replace 'ReportingData V_DIM_Dates'[FYDate Y] with the appropriate column reference from your 'DIM-Dates' table. This modification should help resolve the error you're encountering. If you continue to experience issues, feel free to provide additional details, and I'll be glad to assist you further!

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.