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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Ramendra
Helper IV
Helper IV

Comparing raw count against category for two different dates in Matrix visual

Hi Sir,

How to compare raw count against category for two different dates in Matrix visual using conditional formatting. I have a matrix table where I am showing the volume like below for two dates and I want to highlight if the volume is increasing or decreasing using conditional formatting.

Category15-Aug-2316-Aug-23
A4535
B5565
C5768



1 ACCEPTED SOLUTION
Bmejia
Super User
Super User

You can create a measure like this , all i am doing is subtracking the current date from the previous date and if is less than 0 i give it a 1 else 0..  You can then use this measure to create your conditional format.

 

Prior Day Volume =

VAR currentDate = SELECTEDVALUE('date header'[Date], BLANK())
VAR priorDate =  CALCULATE(MAX('date header'[Date]), ALL('date header'[Date]), 'date header'[Date] < currentDate)

RETURN
IF(
CALCULATE(SELECTEDVALUE('date header'[Value]), 'date header'[Date] = priorDate)-CALCULATE(SELECTEDVALUE('date header'[Value]), 'date header'[Date] = currentDate)<0,
1,0)

Bmejia_1-1692222109476.png

 

View solution in original post

1 REPLY 1
Bmejia
Super User
Super User

You can create a measure like this , all i am doing is subtracking the current date from the previous date and if is less than 0 i give it a 1 else 0..  You can then use this measure to create your conditional format.

 

Prior Day Volume =

VAR currentDate = SELECTEDVALUE('date header'[Date], BLANK())
VAR priorDate =  CALCULATE(MAX('date header'[Date]), ALL('date header'[Date]), 'date header'[Date] < currentDate)

RETURN
IF(
CALCULATE(SELECTEDVALUE('date header'[Value]), 'date header'[Date] = priorDate)-CALCULATE(SELECTEDVALUE('date header'[Value]), 'date header'[Date] = currentDate)<0,
1,0)

Bmejia_1-1692222109476.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors