Forum Discussion
Format values when using dynamic metrics and dimensions
- 4 years ago
Well, as often happens, I worked this out myself soon after posting this, and with a bit of help from this video: Dynamic NUMBER FORMATTING using CALCULATION GROUPS in Power BI - YouTube
To fix this I added a format column to my metrics table (values are 0 for number metrics and #0.0% for percentages). Then I created a new calculation group with just one item called format, which has the expression SELECTEDMEASURE() and the format string expression is SELECTEDVALUE(Metrics[Format]).
Finally I added a filter to the chart, which is the 'name' field from the calculation group and selected the column in it.
Well, as often happens, I worked this out myself soon after posting this, and with a bit of help from this video: Dynamic NUMBER FORMATTING using CALCULATION GROUPS in Power BI - YouTube
To fix this I added a format column to my metrics table (values are 0 for number metrics and #0.0% for percentages). Then I created a new calculation group with just one item called format, which has the expression SELECTEDMEASURE() and the format string expression is SELECTEDVALUE(Metrics[Format]).
Finally I added a filter to the chart, which is the 'name' field from the calculation group and selected the column in it.