cancel
Showing results for
Did you mean:

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.

Frequent Visitor

Cumulative Total for Coming Two Months

Currently i am looking for an solution called cumulative total in months, Lets Say If there's June Month in the row context then it should show up the sales value for July abd August, Similary If there's July then it should show up sales for August abd September. So basically its the cumulative of two months together.

2 ACCEPTED SOLUTIONS
Resolver II

Its working fine, I hope you are using custom date table

Frequent Visitor

Its Not Working for me but i came up with below calculation and its working correct for me,

Test3 =
Var a= SELECTEDVALUE(Sheet1[Dte])
Var b=Month(a)
Var c=b+1
Var d=c+1
Var e= CALCULATE(Sheet1[Total Sales],ALL(Sheet1),FILTER('DATE','DATE'[MonthNo] in {c,d}))
Return If (e=blank(),0,e)
4 REPLIES 4
Frequent Visitor

Its Not Working for me but i came up with below calculation and its working correct for me,

Test3 =
Var a= SELECTEDVALUE(Sheet1[Dte])
Var b=Month(a)
Var c=b+1
Var d=c+1
Var e= CALCULATE(Sheet1[Total Sales],ALL(Sheet1),FILTER('DATE','DATE'[MonthNo] in {c,d}))
Return If (e=blank(),0,e)
Frequent Visitor

Hello Its not working as it retrieves the same rows within the calculation.

Resolver II

Its working fine, I hope you are using custom date table

Resolver II

Hi,

Hopefully, the below dax will works

``````IF(
ISBLANK([Total Sales]),BLANK(),
CALCULATE(
[Total Sales],
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
2,MONTH
)
)
)``````

Announcements

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors