Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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 |
---|---|
91 | |
74 | |
71 | |
58 | |
55 |
User | Count |
---|---|
41 | |
39 | |
34 | |
32 | |
30 |