- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rolling 13 Months Sum DAX
Hi friends,
I am trying to create Rolling 13 months sum using DAX and I am looking for some help around it.
This is my data set. And I want to create a measure and not a column which gives me Rolling 13 months sale for the month I select in the filter.
Data Set:
Month Year | Sale |
Apr-21 | 1000 |
May-21 | 200 |
Jun-21 | 3000 |
Jul-21 | 1200 |
Aug-21 | 1500 |
Sep-21 | 1600 |
Oct-21 | 1300 |
Nov-21 | 2000 |
Dec-21 | 1000 |
Jan-22 | 2000 |
Feb-22 | 3000 |
Mar-22 | 1000 |
Apr-22 | 1000 |
May-22 | 2000 |
Jun-22 | 1000 |
Result Expected:
Month Year | Rolling 13 Month Sale |
Apr-22 | 19800 |
May-22 | 20800 |
Jun-22 | 21600 |
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
This measure below will work if you have a date column in your table. It won't work if you have only the month name as it is a text.
Measure =
CALCULATE(
SUM( 'Table'[Sale] ),
DATESINPERIOD( 'Table'[DateRef], MAX( 'Table'[DateRef] ), -13, MONTH )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You may download my PBI file from here.
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You may download my PBI file from here.
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You may download my PBI file from here.
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Ashish for your help and time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are welcome.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
This measure below will work if you have a date column in your table. It won't work if you have only the month name as it is a text.
Measure =
CALCULATE(
SUM( 'Table'[Sale] ),
DATESINPERIOD( 'Table'[DateRef], MAX( 'Table'[DateRef] ), -13, MONTH )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi mate, thans for your time and help, it worked.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
02-15-2024 05:00 PM | |||
07-31-2024 09:01 PM | |||
07-27-2022 04:10 PM | |||
07-28-2024 08:58 AM | |||
02-14-2024 07:32 PM |
User | Count |
---|---|
127 | |
84 | |
59 | |
59 | |
44 |
User | Count |
---|---|
180 | |
119 | |
82 | |
70 | |
54 |