Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have created a simple visual using cards and measures to give the screenshot below. The section above the line uses measures that are affected by slicers, the section below the line is the same measures but unaffected by slicers.
I want to apply conditional formatting based on the top section being higher or lower in value to the bottom.
As an example, on the right hand side, 611.49 is a higher number than 391.92 so I want the text to turn green, equally I would want it red if it was less.
The numbers in the bottom section are not constants and will change as data is updated.
Is this formatting possible when I'm effectively comparing two outputs from the same measure?
thanks,
Ed
Solved! Go to Solution.
Hi @Anonymous ,
I think you will need to create two separate measures. One of the measure is affected by the slicer, the other is not.
Then create the third measure to compare these two slicers and use the third slicer as the rule of conditional formatting.
Please see the example below.
Measure1 = CALCULATE(AVERAGE('Table'[value]),ALL('Table'))
Measure2 = CALCULATE(AVERAGE('Table'[value]),FILTER(ALL('Table'),'Table'[month]=SELECTEDVALUE('Table'[month])))
Measure3 = IF([Measure1]>[Measure2],1,0)
Best Regards,
Jay
Hi @Anonymous ,
I think you will need to create two separate measures. One of the measure is affected by the slicer, the other is not.
Then create the third measure to compare these two slicers and use the third slicer as the rule of conditional formatting.
Please see the example below.
Measure1 = CALCULATE(AVERAGE('Table'[value]),ALL('Table'))
Measure2 = CALCULATE(AVERAGE('Table'[value]),FILTER(ALL('Table'),'Table'[month]=SELECTEDVALUE('Table'[month])))
Measure3 = IF([Measure1]>[Measure2],1,0)
Best Regards,
Jay
Thanks Jay, this should work perfectly.
Hi @Anonymous ,
You need to create a second measure that compares the values with and without filters.
Assuming that you have a simple measure of a sum what you can do is to create the following measure:
Measure = SUM(Table[Column])
Comparision Measure = [Measure] - CALCULATE([Measure], ALL(Table))
Now you can use the second measure to make the condittional formatting. Be aware that I don't have any information about your model so this measure is not optimized the use of the Table in the ALL syntax is not advised.
But overall setting should be similar to the one above.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsAdvance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.