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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.