Forum Discussion
kasife
3 years agoHelper V
Comparing months with the same selected period
Hi people, I'm having a little trouble getting the following result: I'd like to get the amount of leads for the current month, the previous month and the month before the previous one according ...
- 3 years ago
Hi
DATEADD is meant to give the result in the selected date slicer. use these 3 dax
atual = CALCULATE(DISTINCTCOUNT(_leads[Id]),_leads[Produtos com nome do Reaal]<>BLANK())Atual -1 = CALCULATE([atual] , DATEADD(d_calendario[Date] , -1 , MONTH))Atual -2 = CALCULATE([atual] , DATEADD(d_calendario[Date] , -2 , MONTH))
aj1973
3 years agoCommunity Champion
Hi
DATEADD is meant to give the result in the selected date slicer. use these 3 dax
atual = CALCULATE(DISTINCTCOUNT(_leads[Id]),_leads[Produtos com nome do Reaal]<>BLANK())
Atual -1 = CALCULATE([atual] , DATEADD(d_calendario[Date] , -1 , MONTH))
Atual -2 = CALCULATE([atual] , DATEADD(d_calendario[Date] , -2 , MONTH))