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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sneevand
Frequent Visitor

Cumulative total by category -Measure

 

Raw data 

Dateamountproduct
01-01-202010Product1
01-02-202012Product2
01-03-202010Product1
01-04-202013Product2
01-05-202015product2
01-06-202010product1
 70 

 

Expected data:

Dateamountproducttotalbyproduct
01-01-202010Product130
01-02-202012Product240
01-03-202010Product130
01-04-202013Product240
01-05-202015product240
01-06-202010product130
 70  
1 ACCEPTED SOLUTION
Carmichael
Resolver I
Resolver I

Does this work for your context?

 

 

Sum by Product: = 
CALCULATE(
    SUM('Table'[amount]),
    ALLEXCEPT('Table', 'Table'[product])
)

//Removes filter context from the table except for product

 

 

Result:

Carmichael_0-1613693246423.png

 

 

https://docs.microsoft.com/en-us/dax/allexcept-function-dax

 

If this works for you then please select as Answer.  All likes and Kudos appreciated.

View solution in original post

1 REPLY 1
Carmichael
Resolver I
Resolver I

Does this work for your context?

 

 

Sum by Product: = 
CALCULATE(
    SUM('Table'[amount]),
    ALLEXCEPT('Table', 'Table'[product])
)

//Removes filter context from the table except for product

 

 

Result:

Carmichael_0-1613693246423.png

 

 

https://docs.microsoft.com/en-us/dax/allexcept-function-dax

 

If this works for you then please select as Answer.  All likes and Kudos appreciated.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.