Forum Discussion
Anonymous
6 years agoNot applicable
Sum Column with Multiple Criteria
Hi All, Trying to acheive something like this in "New Column", using a DAX function. I want to sum the Sales values for matching Year, Month, and Cat1 rows. Year Month Cat1 Cat2 Sa...
- 6 years ago
Hi Anonymous ,
You also could try this calculated column.
Column = CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Year] = EARLIER ( 'Table'[Year] ) && 'Table'[Month] = EARLIER ( 'Table'[Month] ) && 'Table'[Cat1] = EARLIER ( 'Table'[Cat1] ) ) )Here is the output.
Hope this can help you.
Best Regards,
Cherry
v-piga-msft
6 years agoResident Rockstar
Hi Anonymous ,
You also could try this calculated column.
Column =
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Year] = EARLIER ( 'Table'[Year] )
&& 'Table'[Month] = EARLIER ( 'Table'[Month] )
&& 'Table'[Cat1] = EARLIER ( 'Table'[Cat1] )
)
)
Here is the output.
Hope this can help you.
Best Regards,
Cherry