Forum Discussion
conditional format based on calculation in matrix.
- 5 years ago
Hi Tim_H ,
Create the following measure:
Previous_Month_Values = COUNT('Table'[Severity]) - CALCULATE(COUNT('Table'[Severity]); DATEADD('Table'[Date];-1;MONTH))Now create the condittional formatting based on this measure:
Check PBIX file attach is using a sum and not a count but works in the same way just replace use the syntax above.
Hi Tim_H ,
Create the following measure:
Previous_Month_Values = COUNT('Table'[Severity]) - CALCULATE(COUNT('Table'[Severity]); DATEADD('Table'[Date];-1;MONTH))
Now create the condittional formatting based on this measure:
Check PBIX file attach is using a sum and not a count but works in the same way just replace use the syntax above.
- Tim_H5 years agoHelper I
Hi MFelix
Thanks, but not 100% working. I do see arrows but all have same color. I think this is because my 'severity' is not counted as you have in column Quantity but is still line/line for several dates in one month.
Below extract from very uge file ( + 18K tickets)
kr
Tim
- MFelix5 years agoSuper User
Hi Tim_H,
A good practice for this type of calculation is to add a Calendar table that related with your date column then you just need to do the following measure for the formatting:
Previous_Month_Values = COUNT('Table'[Severity]) - CALCULATE(COUNT('Table'[Severity]); DATEADD('calendar'[Date];-1;MONTH))Now do the formatting has previously.
- Tim_H5 years agoHelper I
Hi MFelix
Works ! great thanks...
had to change my formula by adding .date
DATEADD(overview[Reported date YYYY-MM].[Date],-1,MONTH))Previous_Month_Values = count(overview[Severity]) - CALCULATE(COUNT(overview[Severity]),DATEADD(overview[Reported date YYYY-MM].[Date],-1,MONTH))Kind regards
Tim