Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
Anonymous
Not applicable

Accumulated Rolling 12 Months

Hello,

 

I am trying to create a bar chart as shown in below picture which has Month-Year on x-axis and no of tickets on Y-axis. It has to show rolling 12 months until previous month i.e., In Dec-2020, the chart should show Dec-2019 to Nov-2020, this was achievable. The challenge is - how do i get the accumulation of values over months as in below image?

i.e., 2019-Dec = SUM(Dec-19)

      2020-Jan = SUM(Dec-19 + Jan-20)

      2020-Feb = SUM(Dec-19 + Jan-20 + Feb-20)

      .

      .

      .

      2020-Nov = SUM(Dec-19+Jan-20+Feb-20+....+Nov-20)

 

DivyaAnand_0-1607262735241.png

 

Thank you.

 

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a calculated column as follows.

calculated_value = SUMX(FILTER('Table5',[date]<=EARLIER(Table5[date])),[value])

 

Result:

v-yuaj-msft_0-1607476022621.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Assuming you have a Calendar table and that you have dragged Year and Month from the Calendar table to your visual, try these measures

Total = sum(data[value])

Running 12 months total = calculate([total],datesbetween(calendar[date],edate(min(calendar[date]),-11),max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, you can create a calculated column as follows.

calculated_value = SUMX(FILTER('Table5',[date]<=EARLIER(Table5[date])),[value])

 

Result:

v-yuaj-msft_0-1607476022621.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

littlemojopuppy
Community Champion
Community Champion

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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