Forum Discussion
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
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,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- selimovd
Most Valuable Professional
Hello Anonymous ,
can you give an example how that should look like?
A column are persisted values in the data model and multiple rows. A measure is calculated dynamically and depending on the filter context. For that reason you cannot copy values in a measure.
But I think when you explain what you want to do we will find a solution 😊
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic- AnonymousNot applicable
I want to use columns(categorical) as filter/slicer and then use the slicer to filter the plots/charts.
I am making new measures from the columns to use them in SWITCH condition to create filter/slicer. So maybe if I can get some help that would be really helpful
- selimovd
Most Valuable Professional
Hey Anonymous ,
can you give an example? I don't fully understand what you want to do.
If you want to use a column as a slicer you can just drag and drop the column in the slicer. Then the visuals will be filtered automatically.
When you reply please mark me like that Anonymous
Otherwise I will not see that you replied to the post.
Thank you and best regards
Denis