Forum Discussion
Anonymous
4 years agoNot applicable
DAX Formula - Sum Question
Hello, I am trying to sum up the total extended cost of our items. I am unsure how to filter some of the results, however, and need help. In the screenshot below, you can see that I've filte...
- 4 years ago
Thank you for providing the sample data. That helps a lot with proposing a potential solution.
Include = VAR a = SUMMARIZE ( 'Table', 'Table'[MATERIAL TRANSACTION ITEM], 'Table'[MATERIAL TRANSACTION LOCATION], "Issue", CALCULATE (SUM ( 'Table'[EXTENDED COST] ),'Table'[TRANS_TYPE] = "Issue/WIP Change"), "Ship", CALCULATE ( SUM ( 'Table'[EXTENDED COST] ), 'Table'[TRANS_TYPE] = "Ship" ) ) VAR b = ADDCOLUMNS ( a, "sm", IF ( [Issue] <> 0, [Issue], [Ship] ) ) RETURN SUMX ( b, [sm] )see attached
lbendlin
4 years agoSuper User
Thank you for providing the sample data. That helps a lot with proposing a potential solution.
Include =
VAR a =
SUMMARIZE (
'Table',
'Table'[MATERIAL TRANSACTION ITEM],
'Table'[MATERIAL TRANSACTION LOCATION],
"Issue", CALCULATE (SUM ( 'Table'[EXTENDED COST] ),'Table'[TRANS_TYPE] = "Issue/WIP Change"),
"Ship", CALCULATE ( SUM ( 'Table'[EXTENDED COST] ), 'Table'[TRANS_TYPE] = "Ship" )
)
VAR b =
ADDCOLUMNS ( a, "sm", IF ( [Issue] <> 0, [Issue], [Ship] ) )
RETURN
SUMX ( b, [sm] )
see attached
Anonymous
4 years agoNot applicable
This worked PERFECTLY for us! Thank you so much!!!