Forum Discussion
Measure Value for Previous Month
- 4 years ago
Hi,
You must have a Calendar Table with calculated columns for Year, Month name and Month number. Sort the Month name by the Month number. Create a relationship from the Date column of your Data Table to the Date column of the Calendar Table. Create slicers from the year and Month name columns of the Calendar Table and select a year and Month name. Write these measures
Total = sum(Data[Amount])
Previous month total = calculate([Total],previousmonth(Calendar[Date]))
Hope this helps.
Hi,
You must have a Calendar Table with calculated columns for Year, Month name and Month number. Sort the Month name by the Month number. Create a relationship from the Date column of your Data Table to the Date column of the Calendar Table. Create slicers from the year and Month name columns of the Calendar Table and select a year and Month name. Write these measures
Total = sum(Data[Amount])
Previous month total = calculate([Total],previousmonth(Calendar[Date]))
Hope this helps.