Forum Discussion
Define column in measure based on selected value
- Anonymous2 years ago
Update!
Based on the answer for Yulia, this is not possible to achieve in DAX.
BR Morten
Anonymous , You can not use selected value in a column
I think what you are looking for can be achieved using field parameters of Calculation groups
Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf
Power BI Field Parameters, Keep Axis Sort intact| Always Sort on X/Categorial Axis: https://youtu.be/GfBrB6czByw
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0
Learn Power BI: Model explorer public preview with calculation group authoring| Measure Slicer: https://youtu.be/VfxfJJ0RzvU
Hi Amit,
Thank you for the answer.
However I'm not trying to use the selected value in a column. I want to define which column to use for the calculation (in a calculated measure) based on the selection in the slicer.
As far as I can tell, I'll have to define all measures, if I use the method, you propose. If that's the alternative it would be less work to create a switch, which could handle all measures (which was what I wanted to avoid). So I don't see it as a solution for my question.
BR Morten