Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Raw data
Date | amount | product |
01-01-2020 | 10 | Product1 |
01-02-2020 | 12 | Product2 |
01-03-2020 | 10 | Product1 |
01-04-2020 | 13 | Product2 |
01-05-2020 | 15 | product2 |
01-06-2020 | 10 | product1 |
70 |
Expected data:
Date | amount | product | totalbyproduct |
01-01-2020 | 10 | Product1 | 30 |
01-02-2020 | 12 | Product2 | 40 |
01-03-2020 | 10 | Product1 | 30 |
01-04-2020 | 13 | Product2 | 40 |
01-05-2020 | 15 | product2 | 40 |
01-06-2020 | 10 | product1 | 30 |
70 |
Solved! Go to Solution.
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:
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.
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:
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.