Forum Discussion
Previous Month only Blank
- 5 years ago
The reason I asked because in your sample data one of the numbers (43) has the most recent data up to Oct, the rest is up to Nov and that was the reason for this question. Anyhow here is the measure for the previous month:
Previous month Count = VAR __currentDate = EOMONTH ( MAX ( Sheet1[date] ), -1 ) RETURN CALCULATE ( COUNTROWS ( Sheet1 ), DATESBETWEEN ( Sheet1[date], EOMONTH ( __currentDate, -1 ) + 1, __currentDate ) )Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
I think now I got what you are looking for, one more question, let's number 1 has the last transaction date Oct 2020, for this number the current month is Oct 2020 and prev month is Sep 2020 and now another number 2 has the last transaction date Jan 2021, so it's previous month would be Dec 2020. In other words, the current month is relative to the number, not global across all the numbers based on the last date in the table, correct?
- Anonymous5 years agoNot applicable
the latest month is consistent across all values. So its always a measure of the current month vs the previous month, doesnt matter if car A was last observed 6 months prior. if its currently jan 2021 and i just got my data in for december 2020, then dec 2020 is the current month, i measure the change for every observation from nov 2020 to dec 2020.