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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Conditional Formatting for a matrix when a count value changes from the previous columns count

I would like the bolded text's cells in the matrix below to be highlighted. Or even if one of the cells would work when a change occurs would be fine. I'm not opposed to any way to get this to work. Thank you so much.

 

id2022.242022.252022.262022.272022.28
111222
211111
312221
2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

You must have a Calendar Table with a relationship (Many to One and Single) from the Date column of your table to the Date column of the Calendar Table.  To your visual, drag Date column from the Calendar Table.  Write these measures:

Total = sum(Data[Value])

Total on previous day = calculate([Total],previousday(Calendar[Date]))

Variance = [Total]-[Total on previous day]

Use this Variance measure in Conditional formatting and apply your desired formatting.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hi,

In the Calendar Table should be a Weeknumber column.  Create the yyyy.ww column as well and drag that to your visual.  Write these measures

Total in previous week = calculate([Total],datesbetween(Calendar[Date],min(calendar[Date])-6,max(calendar[Date])-6))

Variance = [Total]-[Total in previous week]


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You must have a Calendar Table with a relationship (Many to One and Single) from the Date column of your table to the Date column of the Calendar Table.  To your visual, drag Date column from the Calendar Table.  Write these measures:

Total = sum(Data[Value])

Total on previous day = calculate([Total],previousday(Calendar[Date]))

Variance = [Total]-[Total on previous day]

Use this Variance measure in Conditional formatting and apply your desired formatting.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Only problem I'm running into is that I need a measure for the previous work week, hence the yyyy.ww format. You are correct about the relationship which was already established 1:*  from calendar to fact table. Thoughts?

Hi,

In the Calendar Table should be a Weeknumber column.  Create the yyyy.ww column as well and drag that to your visual.  Write these measures

Total in previous week = calculate([Total],datesbetween(Calendar[Date],min(calendar[Date])-6,max(calendar[Date])-6))

Variance = [Total]-[Total in previous week]


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.