Forum Discussion
How to apply the same conditional formatting on multiple columns?
- 4 years ago
Please consider this solution and remember I am an unpaid Power BI volunteer, so click the thumbs up button if you like me helping you and the solved button if I fix your problem.
Click here for an example solution
This example has the targets in table but you could hard code them in a switch statement.
A table is better because the users can edit the targets without a PBI developer changing DAX.
Create a dax measure like thisKPI Colour =VAR mytarget = SELECTEDVALUE(Facts[Target])RETURNIF(SUM(Facts[Value])> mytarget, "Red","Green")Then in conditioinal formating select
Format Style = Field ValueWhat field should we base this on = KPI Colour
I can not state how much i apreciate your contribution. I wasted hours figuring this out. The docmentation is ok but without an example i could not figure it out. Your example saved me. Chat GPT was worthless also.
Thank you. Glad you aprecaite the effort I put into creating an example solution