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
Greger1337
Frequent Visitor

Keep cumulative sum when filtering

I having trouble with my cumulative sum.

I have data from 29 months and I am calculating a rolling sum for the last 12 months like this:

Ackumu rullande 12 månader omsättning = 
CALCULATE([Omsättning]; 
          DATESINPERIOD('Date'[Date]; 
                        LASTDATE('BFO Transactions'[Date]);-12;MONTH
                       )
         )

The result looks like this:

 

rullande.JPG

The problem is I only want to show the periods when the rolling sum is a complete year so I filter it but the the cumulative rolling sum no longer starts at the beginning of my data set and the result looks like this:

 

rullande2.JPG

 

How can I keep the sum from changing when I change the time filter?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try adding another filter, ALL() to your CALCULATE().

 

CALCULATE([Omsättning],ALL('BFO Transactions','BFO Transactions'[Date]),DATESINPERIOD…)  

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Try adding another filter, ALL() to your CALCULATE().

 

CALCULATE([Omsättning],ALL('BFO Transactions','BFO Transactions'[Date]),DATESINPERIOD…)  

 

Thank you!

Ackumu rullande 12 månader omsättning = 
CALCULATE([Omsättning]; ALL('BFO Transactions'[Date]);
DATESINPERIOD('Date'[Date]; 
LASTDATE('BFO Transactions'[Date]);-12;MONTH)
)

This did exacly what I was after.

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.