Forum Discussion
Display last 12 months
I am lookking to display the last 12 months and the data for selected month. If a user selects december 2019, it will dsipaly all months from december 2018 till december 2019.
Example:
| December 2018 |
| January 2019 |
| February 2019 |
| March 2019 |
| April 2019 |
| May 2019 |
| June 2019 |
| July 2019 |
| August 2019 |
| September 2019 |
| October 2019 |
| November 2019 |
| December 2019 |
Here is the pbix file https://drive.google.com/file/d/1WBOolZIFNTWQsPt_QvCY5OAmdy80lHzm/view?usp=drivesdk
Hi Anonymous ,
I think you need to create a calendar table and create measure to achieve this goal. You could refer to my sample for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandak
Super User
Anonymous , refer if this can help
https://www.youtube.com/watch?v=duMSovyosXE
In can you need rolling 12 months
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH))
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-12,MONTH))- AnonymousNot applicable
amitchandak My problem is to display the list of the last 12 months, not to calculate the sum of measures.
- amitchandak
Super User
Anonymous , I shared a video link for that.
https://www.youtube.com/watch?v=duMSovyosXE
Or you can use relative date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
- dax
Community Support
Hi Anonymous ,
I think you need to create a calendar table and create measure to achieve this goal. You could refer to my sample for details.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.