Forum Discussion
Previous Month to Date
- 4 years ago
cham Try:
Measure Total = VAR __Total = SUMX(SUMMARIZE('Table',[End of Month],"__PrevMonth",[PreviousMonthMeasure]),[__PrevMonth]) RETURN IF(HASONEVALUE('Table'[End of Month]),[PreviousMonthMeasure],__Total)
cham Oh, I misread. This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Hi Greg_Deckler
Please see the screesnhot below,
2020 year total is giving e the corrcet sum of 2020 months
But the measures I used to get the previous month value is correct. Every month is giving the previous month value but the Total of all the months values showing in sub total is incorrect.
WhatI can do for that.
thanks.
- Ashish_Mathur4 years ago
Super User
Hi,
I am confused but I'd also like to help you. Please show clearly in an MS Excel file, the result you are expecting.
- cham4 years ago
Post Patron
Please find the below details,
This is the Power BI table - which is not givingthe current SUB total of 2019 months
This is the excel data set, Power BI sub total needs to be as below highlited total.
Thanks,
- Greg_Deckler4 years ago
Community Champion
cham Try:
Measure Total = VAR __Total = SUMX(SUMMARIZE('Table',[End of Month],"__PrevMonth",[PreviousMonthMeasure]),[__PrevMonth]) RETURN IF(HASONEVALUE('Table'[End of Month]),[PreviousMonthMeasure],__Total)
- Greg_Deckler4 years ago
Community Champion
cham See MM3TR&R it's essentially the same issue as with measure totals: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community