Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
Out data range is for 48 months. We are trying to calculate the running total that should start from 13th month onward considering last 12 months. And for 14th month (next year) this should have Month 2 to Month 13, so on and so forth. A small excel snippet is below. Can we do this in DAX? Much appreciate your inputs.
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Thank you @Ashish_Mathur It worked perfect for me. The only change I did was to include a serial number ([SNO]) column which was giving right results versus the "Months transpired"
SNO = RANKX(ALLSELECTED(Table),CALCULATE(MAX(Table[Date Key])),,DESC,Dense)
---------------
@Jihwan_Kim this is the data I was looking to solve where I do not have a Month No. since the date could start from anywhere, Thanks a ton.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @aktelidevara ,
If you could provide the output that you expected or the sample pbix files(without sensitive data) would be great.
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Also, you may check if these thread helps
Solved: Rolling sum next 12 months of sales - Microsoft Power BI Community
Solved: Rolling 12 Month Calculation (Not Cumalative) - Microsoft Power BI Community
Solved: PY rolling 12 months calculation issue - Microsoft Power BI Community
Best Regards,
Community Support Team _ Caitlyn
Thank you for the response @v-xiaoyan-msft . here is my dataset.
1.My Annual Value starts acukmulating after 12 months always and for each row it will be calculated for the past 12 months.
2.The below values are from the transaction table which has only one row per each month.
3. I have a Date table to join with the Transaction table as well.
4. Source is SAP HANA using DirectQuery
I tried with DATESINPERIOD but always returns the same number as the "Value" in each row
Date, Value, Annual Value
10/21/2015, 12
9/21/2015, 16
8/20/2015, 24
7/21/2015, 29
6/19/2015, 35
5/20/2015, 41
4/21/2015, 47
3/23/2015, 53
2/20/2015, 59
1/21/2015, 65
12/19/2014, 71
11/19/2014, 77, 532
10/21/2014, 83, 603
9/22/2014, 89, 677
8/21/2014, 95, 748
7/22/2014, 101, 820
6/20/2014, 107, 892
5/21/2014, 113, 964
4/21/2014, 119, 1,036
3/21/2014, 125, 1,108
2/20/2014, 131, 1,180
1/21/2014, 137, 1,252
12/19/2013, 143, 1,324
11/19/2013, 149, 1,396
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |