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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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