Forum Discussion
Calculation Group SELECTEDMEASURE interacting/overwriting other measures
I have tried to create a dynamic line chart based on 8 different measures as input, making the user able to switch between the measures, to get a dynamic view of the chart. At first, I created a small table with the headers of the measures, and I used a SWITCH(TRUE() function to select between various measures, as input to the chart:
Selected Measure = SWITCH(TRUE(),
My initial issue was, that I would like to view some of these 8 measures as Whole Number, and some in Percentage in the chart. Unfortunately the "Selected Measure" measure can only be formatted to one type. I tried various solutions using FORMAT functions in the DAX expression for each individual measure, but this didn't work.
Therefore I created a Calculation Group in Tabular Editor instead, creating the 8 measures as Calculation Items, and using SELECTEDMEASURE as a substitute for the original SWITCH(TRUE()) function. In Tabular Editor I was able to format the measures with various formats, and use the calculation group as input in the chart in Power BI. At this point, the line chart itself worked as intended.
Unfortunately, I am now in a situation where the selected measure in the calculation group is overwriting the rest of the measures on my report page. Everything that is not hardcoded to a particular value/text string/etc. will take the value of the measure from the calculation group - fx. dynamic titles, cards and other visuals will all show the total value of the measure selected from the calculation group. I am looking for a solution to this issue, where the calculation group SELECTEDMEASURE() is not the dominant measure in all visuals, as the Selected Measure should only interact with part of the report page.
Thanks in advance!
3 Replies
- DataInsightsSuper User
Have you disabled interactions between the calculation group slicer and the visuals that should not be impacted?
- CarlEThinggaardFrequent Visitor
I have tried to edit the interactions, this does not seem to fix the issue.
I have been in talks with Microsoft, and reported the issue as a bug: https://community.powerbi.com/t5/Issues/Bug-when-using-Calculation-Group-and-SELECTEDMEASURE-as-input-to/idi-p/2482231
- v-henryk-mstfCommunity Support
Hi CarlEThinggaard ,
Were the solutions given by the engineers in the issue forum helpful to you?
If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry