Forum Discussion
Anonymous
2 years agoNot applicable
Conditional Formatting Dax
I know there is a lot of stuff out there about this but I have been going at it for ages and still can't figure it out. I am trying to compare each months count with the previous month. I want to co...
Alex87
2 years agoSolution Sage
Hello,
I reproduced your usecase
The formula I used for conditional formatting is the following:
Matrix Object Color =
VAR _CurrentMonthResult = SUM(DataConD[Value])
VAR _PrevPer = SELECTEDVALUE(Dates[CurrMonthOffset]) - 1
VAR _PreviousMonthResult =
CALCULATE(
SUM(DataConD[Value]),
FILTER(ALL(Dates),
Dates[CurrMonthOffset] = _PrevPer)
)
VAR _Result = IF(_CurrentMonthResult < _PreviousMonthResult, "#F6EEEF", "#F0F6EE")
RETURN
_Result
Replace the sum of value from my example with the count of ids as in your datasource and it should work.
If it does work, do not forget to mark my post as a solution. Thanks!