Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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

 

 

 

 

  • Anonymous 

    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 !!

1 Reply

  • Anonymous 

    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 !!