Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Column as measure

Hi Team,   I would like to copy the values of a column to a measure but I am not able to do so. Any help would be appreciated.   Thanks, Ali Asgar
  • v-kkf-msft's avatar
    v-kkf-msft
    4 years ago

    Hi Anonymous ,

     

    There are two ways to achieve it.
    1. Unpivot columns Compared Budget Sales Year 2019 and Compared Budget Sales Year 2020.

     

    2. Create a new table showing the column names, then create the following measure and use the matrix visual.

     

    Measure = 
    SWITCH ( 
        SELECTEDVALUE ( ColumnsName[Name] ), 
        "Compared Budget Sales Year 2019", MAX ( 'Table 2'[Compared Budget Sales Year 2019] ), 
        "Compared Budget Sales Year 2020", MAX ( 'Table 2'[Compared Budget Sales Year 2020] )
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.