Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi ,
How can i make a conditional formating that is more dynamic , based on target , not a fixed number
I would like to have the performance be red if it less than target when i filter for different country
https://1drv.ms/u/s!ApIDnMK2eKiFgQXmusmux50Amuqw?e=fJedro
thanks
Solved! Go to Solution.
Write a formatting measure that compares the amounts and returns the color based on the result.
Formatting =
VAR _compare = SUM ( formating[performance ] ) - SUM ( formating[Target ] )
RETURN
SWITCH (
TRUE(),
_compare > 0, "Green",
_compare < 0, "Red",
"Grey")
Then set the conditional formatting based on the measure:
@ktt777 , refer
Color Measure - Conditional formatting
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692
Write a formatting measure that compares the amounts and returns the color based on the result.
Formatting =
VAR _compare = SUM ( formating[performance ] ) - SUM ( formating[Target ] )
RETURN
SWITCH (
TRUE(),
_compare > 0, "Green",
_compare < 0, "Red",
"Grey")
Then set the conditional formatting based on the measure:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 64 | |
| 31 | |
| 26 | |
| 26 |