Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
mattheusbelan
New Member

Accumulated - doing accumulated 12 months for every month of the axis x

Guys, good morning.

 

I'm trying to create accumulated measure but I'm not getting it. Actually it's a different accumulation, since I want it to show me on the x axis the last 6 months and the value of each month is the accumulated 12 months back.

 

ex:

the X Axis contains 6 months (June / 18, July / 18, August / 18, September / 18, October / 18, November / 18). The value that will show in June / 18 is the sum of July / 17 until June / 18 (last 12 months), the amount that will show in July / 18 is the sum of August / 17 until July / 18 (last 12 months) and so on. That is, each month it makes the accumulated 12 months back. can you help me?

I have attached a file to make it base to make the formula. I put a page filter with a relative date of the last 6 months, but I can not do this accumulation.

 

Thank you,
Mattheu12 months - accumulated per month.JPG

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @mattheusbelan,

Based on my test, you could refer to below steps:

Sample data:

1.PNG

Create a new calender table:

date = CALENDARAUTO()

Create a measure:

Measure = CALCULATE(SUM(Table1[Value]),DATESINPERIOD('date'[Date],MAX('date'[Date]),-12,MONTH))

Result(I have set a visual slicer on it to show the last 6 month):

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
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

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @mattheusbelan,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Employee
Employee

Hi @mattheusbelan,

Based on my test, you could refer to below steps:

Sample data:

1.PNG

Create a new calender table:

date = CALENDARAUTO()

Create a measure:

Measure = CALCULATE(SUM(Table1[Value]),DATESINPERIOD('date'[Date],MAX('date'[Date]),-12,MONTH))

Result(I have set a visual slicer on it to show the last 6 month):

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

 

There is no file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi Mattheu,

See this image and tell us if works for you.

 

12mesesPrevios.png

 

 

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.