Forum Discussion
Rules for graph formatting not applied correctely
When i hover over the bars, thats when I see that the formatting is not applied correctly. Then it shows the values i mentioned above (17.26, 19.17%). And even though they should appear in red, they appear in blue.
The rule doesn't need any DAX, i put it here:
The measure I am visualizing as bars has the formula
Data for bars =
CALCULATE(
COUNTROWS('datatable'),
'datatable'[color] = "Red"
)/
COUNTROWS('datatable')
I am plotting it over another attribute of the data table (a customer key) on the x-axis.
Thanks for your help!
hi Rebreg
My german is not good, but I've noticed you've got different units for the tolerances. This could be confusing it - maybe this is the issue?
Prozent vs zahl
Pi
- Anonymous3 years agoNot applicable
Ah I am sorry, I made an example just for this post where I was sloppy. In my plot all the units are the same (%) and the problem still occurs.
- pi_eye3 years agoResolver IV
Hi - this is very strange. I was able to recreate the issue locally.
When I set the tolerances as % - the formatting in the chart is wrong:
However when I change it to Numbers it starts to work:
I'm not sure why that is - I can only think it might be some sort of bug? Because the % values are accurate in the bars!
I used the same DAX, almost word for word
Data for bars =CALCULATE(COUNTROWS('what if'),'what if'[Color] = "Red")/COUNTROWS('what if')Pi
- pi_eye3 years agoResolver IV
Anonymous , I have just figured it out!
According to the guidance, the % values in conditional formatting refer to the the bar's value as a percent of the overall range of bars
So it does not refer to the value of the individual bar itself.
Please refer to : https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-by-rules
Unfortunately this is not intuitive, hopefully microsoft can make this clearer in future releases!
Pi