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
Hi This helps, but do I still have to apply conditional formatting to EACH individual column?
I'm trying to apply a background colour to 100s of columns where the percentage is greater than 100%
Thanks
This has been requested years ago in Fabric Ideas but hasn't gained much traction. Hope it's ok if I plug it here in case others are having trouble with this and want to draw some attention so the devs can put it on higher priority:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=d4c8e896-897c-ed11-a76e-281878bd0b04