Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a measure that I want to pull the previous months value instead of the current value when I put it in a table. Is it possbile to do this and ignore all page date filters as well? Needed in a calculation so I cant just filter the visual either.
Solved! Go to Solution.
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.
You made my day with this!!!! the date table is what did the trick
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |