Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone
I'm trying to get a table in PowerBI to format the background color in a table based on the sum of values. It works, but the color variation looks very differentnet than in the same table in Excel. The Excel table has a much wider range of yellow and orange colors "between", while the PowerBI is almost entirley green or red. However, it should work the same way because the scale on both is red-yellow-green. Any idea how to change this?
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
As in the Excel rule you need to fill in the middle value with the percentile 50% and on PBI this is not calculated with percentile however you can make a workaround:
percentile = CALCULATE(PERCENTILE.EXC('Table'[Value];0,5);ALL('Table'))
percentile =
PERCENTILEX.EXC(ALL('Table');[Measure 2];0,5)
As you can see the difference is where the ALL syntax is placed.
Percentile_Variation = SUM('Table'[Value])-[percentile]
If you are using a measure replace the SUM by the name of your measure
The thought process is that the middle value (yellow) should be place in the percentile value so for that the value is 0 because I'm picking up that value and substrating from the original value so them the diverging colours work correctly.
You can change the percentile value on the measure to adjust to your needs if you don't want 0,5.
See PBIX file attach. (added the category so that alll the values would appear in the table.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
As in the Excel rule you need to fill in the middle value with the percentile 50% and on PBI this is not calculated with percentile however you can make a workaround:
percentile = CALCULATE(PERCENTILE.EXC('Table'[Value];0,5);ALL('Table'))
percentile =
PERCENTILEX.EXC(ALL('Table');[Measure 2];0,5)
As you can see the difference is where the ALL syntax is placed.
Percentile_Variation = SUM('Table'[Value])-[percentile]
If you are using a measure replace the SUM by the name of your measure
The thought process is that the middle value (yellow) should be place in the percentile value so for that the value is 0 because I'm picking up that value and substrating from the original value so them the diverging colours work correctly.
You can change the percentile value on the measure to adjust to your needs if you don't want 0,5.
See PBIX file attach. (added the category so that alll the values would appear in the table.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
79 | |
74 | |
44 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |