Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 @ejoneslor ,
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 @ejoneslor ,
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 @ejoneslor ,
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êsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |