Forum Discussion
rcister
5 years agoFrequent Visitor
undefined
Hello everyone! I have a question about a mesuare. Im trying to make a recount according the month. As you can see, the present month is ok, but when I try to see the following month, the resu...
- 5 years ago
I could fix it!
Thank you very much in any way
Best Regards!
AllisonKennedy
5 years agoCommunity Champion
Make sure you have your Calendar table 'Mark as Date table' see the bottom of this blog for how to:
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Also, then you can update the Recount Next Month measure to:
Recount Next Month = CALCULATE( [Recount Present Month], DATEADD(Calendar[Date], 1, MONTH))
That pattern of CALCULATE( [Measure], DATEADD(Calendar[Date], #, MONTH)) will always work. You can even switch DATEADD for other time intelligence measures and MONTH for other YEAR, etc.
rcister
5 years agoFrequent Visitor
Dear Allison, thank you for you answer... Unfortunately, this measure dont work :(... I used your calendar but the measure for the next month that it gave is exactly the same as the present month...
this is the mesuare for the present month:
Recount Present Month = SUMX (FILTER (dot, dot [Overnight date]), dot [Count])The table dot has the following form:
Reservation number type of room overnight night Count (count by reservation number and room type)
899 single 4/4/2021 1
899 junior 4/4/2021 1
Best Regards!