Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi community!!
I have been given data and from which I have made a table in which there is a column name Average salary and I am having slicer of dates. I want to have a green color if values are above their column's net average and have to be red if they are below net average.
Problem is net average will have to change dynamically and so as colors relatively.How can I do the same???
Thanks in Advance
Solved! Go to Solution.
@pmusram , Assume you have measure [Avg Salary]
Avg Salary overall = averageX(allselected(Table),[Avg Salary])
create a measure like
Color = Switch(True() ,
[Avg Salary] >=[Avg Salary overall] , "Green",
"Red"
)
Use this measure in conditional formatting with field value option
refer for steps
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Hello @pmusram
I tried this by taking an example of years and Average Salary.
Screenshot 1:
Screenshot 1 shows the Values after conditional formatting.
For condition formatting Navigate to Format-> Data Colors-> click on fx
Then apply the below changes(refer to screenshot 2), I took 100000 as the net average
Screenshot 2:
@MintuBaruah Thanks for helping me out.Your solution has helped me but not answered my question as I need to conditional formatting. As my data will change it has to vary accordingly.You can see @amitchandak his answer once .
@pmusram , Assume you have measure [Avg Salary]
Avg Salary overall = averageX(allselected(Table),[Avg Salary])
create a measure like
Color = Switch(True() ,
[Avg Salary] >=[Avg Salary overall] , "Green",
"Red"
)
Use this measure in conditional formatting with field value option
refer for steps
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 83 | |
| 70 | |
| 38 | |
| 28 | |
| 27 |