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))
kasife
3 years agoHelper V
aj1973 thank you so muck for help.
Id like to see this:
I'm going to select periods, for example, from the 15th to the 20th of July, so I'll have the result from the 15th to the 20th of June and May as well.
Instead of using the calendar month, I would like to use dates
- aj19733 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))