Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

How to use conditional formatting on a Score card - comparing it to an average

I'm hoping someone can help me out with this. 

I have two score cards in the image below. The top one is Unique Visitors showing yesterdays data while the bottom one is the daily average of the last 6 weeks. 

 

What approach can I take if I want the top scorecard to either be green if it is higher than the 6 week daily average or red if it is lower than the 6 week average?

image.png

 

The image below is the filter I use for the 6 week daily average metric. I have a separate 'date' table that has a 'period' field that allows me to select yesterday, 2 weeks ago, 6 weeks ago, etc. 

image.png

 

I'm using the following tables, just for reference:

Site Totals Table:

- Metric: Unique Visitors -> used on the top scorecard and that scorecard has a filter on it to only look at yesterdays data.

- Calculated metric for the  6 week daily average scorecard: Avg Daily UVs = AVERAGEX( VALUES(Date_and_Periods[Date]), ('Site Totals'[Total UVs]))

 

Appreciate any help!

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Power BI default Card visual do not support compare columns or measures with conditional formmat. 


For you requirement, I would suggest you to try the Card with States Custom Visual. But you would need to create a measure or column and include the filter in the dax rather just use filter panel. I am not sure about your table, it can be something like: 

 

New Unique visitors = Calculate(sum[Unique Visitors]),filter(table, [Period]="22|Last 6 Weeks")

 

Then compare the 2 measure with Car with States visual. 

Card with States by OKViz.JPG

Remember, It automatically compares with large than">", so you will need to swap the 2 measures when you what small than">".

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 

 

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Power BI default Card visual do not support compare columns or measures with conditional formmat. 


For you requirement, I would suggest you to try the Card with States Custom Visual. But you would need to create a measure or column and include the filter in the dax rather just use filter panel. I am not sure about your table, it can be something like: 

 

New Unique visitors = Calculate(sum[Unique Visitors]),filter(table, [Period]="22|Last 6 Weeks")

 

Then compare the 2 measure with Car with States visual. 

Card with States by OKViz.JPG

Remember, It automatically compares with large than">", so you will need to swap the 2 measures when you what small than">".

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.