Forum Discussion
powerbihelp87
6 years agoHelper V
Help with DAX for SumX and Filter function on multiple columns
I need to calculate the sum of two columns based on filters. I tried: SUMX(FILTER('Test Table','Test Table'[Code="10023" || 'Test Table'[Code]="10039" && 'Test Table'[Category]="az" && 'Test Tabl...
- 6 years ago
Try this:
= SUMX ( FILTER ( ALLSELECTED ( 'Test Table' ), ( 'Test Table'[Code] = "10023" || 'Test Table'[Code] = "10039" ) && ( 'Test Table'[Category] = "az" || 'Test Table'[Category] = "ac" ) ), 'Test Table'[ Amount] )
AntrikshSharma
6 years agoCommunity Champion
Cool, I thought you wanted total for the conditions plus anything that is selected through slicers.
powerbihelp87
6 years agoHelper V
AntrikshSharma Yes, you are right initially I did but then realized I need to see more data. thanks!