Forum Discussion
Calculating last month values
Hi folks,
I have a dataset that contains the date, end of month date and it's values. However, having searched online, I cannot find a way to calculate the last month, as my current formula is showing the current months date and not the previous month.
As you can see for example, 30 June 2020 xx last month is showing sum of people for June 2020, not May 2020.
How can I get it to show the previous month?
3 Replies
- bhanu_gautamSuper User
KossithAz , Try using Previous Month instead of dateadd
XX LAST MONTH = CALCULATE(
SUM('Table1'[PEOPLE]),
PREVIOUSMONTH('Dates Table'[month_end])
)- KossithAzHelper I
Hi, thank you for the response.
I've tried that but the values come back blank:- AnonymousNot applicable
bhanu_gautam Thanks for your contribution on this thread.
Hi KossithAz ,
As suggested by bhanu_gautam , the formula can work with the expeced result. Could you please share your sample pbix file(exclude sensitive data) for further troubleshooting? You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Create relationship
Best Regards