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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

12 month sum in a matrix table

Dear All,

 

I would like to ask for your support. What I am trying to do is to create a table where I will be to sum of the last 12 Months. 

 

I could achieve that by creating the below:

 

12m rolling = CALCULATE([ST month],LASTDATE('Dates EDM'[Date].[Date]))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-1,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-2,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-3,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-4,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-5,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-6,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-7,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-8,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-9,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-10,MONTH))+CALCULATE([ST month],DATEADD('Dates EDM'[Date].[Date],-11,MONTH))
 
The only problem is that then on my table it includes all the months of 2020.
Capture.PNG
How could I stop it and show just the till the last month on my calendar?
 
let me know in case you need any further explanations.
 
Cheers,

Paris
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

From your formula we could know that you are using built-in date hierarchy of power bi for calculation.

So for your case, you could add a new measure as below:

Measure = IF(ISBLANK(MAX('Dates EDM'[Date])),BLANK(),[12m rolling])

Result:

4.JPG

 

Regards,

Lin

Community Support Team _ Lin
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-lili6-msft
Community Support
Community Support

hi  @Anonymous 

From your formula we could know that you are using built-in date hierarchy of power bi for calculation.

So for your case, you could add a new measure as below:

Measure = IF(ISBLANK(MAX('Dates EDM'[Date])),BLANK(),[12m rolling])

Result:

4.JPG

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lili6-msft  thank you very much it worked perfectly! 🙂

vanessafvg
Super User
Super User

@Anonymous   have you tried using a data slicer and limiting the range?   what exactly are you trying to do?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg Hi Vanessa,

 

There are no dates furtherly than Jan-2020 into my calendar. The reason why i see more dates is because it sums 12 months before. That means that on December 2020 it will find the info of Jan-20 and it will show it.

 

thanks for your support.

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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