Forum Discussion
Anonymous
3 years agoNot applicable
Create a new total column per specific row
Hello, I need some help for summarize row in a new column with a condition on rows The logic is : Sum for each product the value of BRAND A & BRAND B and put in every row What i have : ...
- 3 years ago
Anonymous Then try this Measure, also attached an example file
Measure = CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] in {"A","B"} , ALLEXCEPT('Table','Table'[Product]))
DimaMD
3 years agoSolution Sage
Hi Anonymous try it
Measure =
VAR BR_a = CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "A" && 'Table'[Product] = "A") + CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "B" && 'Table'[Product] = "A")
VAR BR_b = CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "A" && 'Table'[Product] = "B") + CALCULATE( SUM('Table'[Value]), 'Table'[BRAND] = "B" && 'Table'[Product] = "B")
return
IF( SELECTEDVALUE('Table'[Product]) = "A", BR_a ,BR_b)