Forum Discussion
Anonymous
4 years agoNot applicable
Help with SUMX on Measures Column
Sumx on Measures not working for me I need a quick dax help here. Sales Item Col1 Col2 col2 Col4 Col3 DIFF A 1...
- 4 years ago
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Diff measure: = VAR _newtable = FILTER ( ADDCOLUMNS ( VALUES ( Sales[Item] ), "@diff", [Col4 measure:] - [Col3 measure:] ), [@diff] < 0 ) RETURN IF ( HASONEVALUE ( Sales[Item] ), SUMX ( _newtable, [@diff] ) )
Jihwan_Kim
Super User
4 years agoHi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Diff measure: =
VAR _newtable =
FILTER (
ADDCOLUMNS (
VALUES ( Sales[Item] ),
"@diff", [Col4 measure:] - [Col3 measure:]
),
[@diff] < 0
)
RETURN
IF ( HASONEVALUE ( Sales[Item] ), SUMX ( _newtable, [@diff] ) )