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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
nielfxrm
Frequent Visitor

Cumulative sum with multiple filters

Hi,

 

I have created a running total DAX formula as below:

 

RunningTotal = 

CALCULATE( 
    SUM( Opportunity[Sales Price (DKK)] );
    FILTER( 
        ALLSELECTED( Opportunity );
        Opportunity[Close Date] <= MAX( Opportunity[Close Date] )
    )
)

That formula works. However, I would like to add the filter below as well - but I can't seem to get that working:

 Opportunity[Pipeline Category] = "Won" 

Any input is appreciated. 

 

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@nielfxrm Please try changing the SUM function inside the CALCULATE as below:

 

SUMX(FILTER(Opportunity,  Opportunity[Pipeline Category] = "Won"), Opportunity[Sales Price (DKK)])




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

3 REPLIES 3
Ashukak
New Member

I tried to following  this  method but get an error

 

 

T1B Cumulative Total =
CALCULATE (
    SUMX(FILTER('VO Register (2)','VO Register (2)'[04 Goal]="Improve Downside (45Q)"),Timeline[T1.Mid Cu.EPV(m$)]);
           FILTER(
            ALLSELECTED('Timeline'[D. Progress to Implement Gate 3]),
            'Timeline'[D. Progress to Implement Gate 3]<= max(Timeline[D. Progress to Implement Gate 3]
        ))
 
Ashukak_0-1713278395721.png

If i remove the " ;" then it tells me the Fileter argument is incorrect

PattemManohar
Community Champion
Community Champion

@nielfxrm Please try changing the SUM function inside the CALCULATE as below:

 

SUMX(FILTER(Opportunity,  Opportunity[Pipeline Category] = "Won"), Opportunity[Sales Price (DKK)])




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Thanks @PattemManohar. That did the job. 

 

I was trying to add the filter somewhere else in the formula.

 

Cheers. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.