Forum Discussion
Format causing measure to return blank.
- 9 years ago
I can't share the file but I will work on building a comparable file that has the same data model layout and see if I can reproduce the issue.
I just tested the histogram bucketing and formatted measure in a table (rather than just a bar chart with labels) and it works fine, so now I don't know why it's not working properly with the bar chart. I believe the issue is that FORMAT() returns a text value, which the bar chart doesn't know is actually textual representations of numbers.
Unfortunately I didn't find any solution. As of now I have 2 histograms, one for % and one for values. It is interesting because they do vary, so maybe it's not the worst thing.
The stacked bar chart method does work; do a stacked bar chart with 2 measures, one a % and one a value. When you use the slicer to select % or value, only the correct bar chart shows up (and the other zeroes out). The only issue there is the y-axis is either in values or %, which is unfortunate. The only way I can think of getting around that is with a custom tooltip logic, maybe.
I found somewhere to vote on this idea if you have not already https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15231165-conditional-formatted-measures-using-switch