Forum Discussion
Sum only positive
- Anonymous2 years ago
Thank you collinq
Hi, SAGUILAR
Based on your description, I created a simple dataset:
You mentioned that the column you are currently showing is a metric, so I simply created a measure as follows:
In order to sum only the positive values in total, I created a measure using the following DAX expression while keeping the original measure:
MEASURE = IF ( ISINSCOPE ( 'Table'[Id] ), 'Table'[Amounts], SUMX ( FILTER ( 'Table', 'Table'[Amounts] >= 0 ), 'Table'[Amounts] ) )Here are the results:
I've uploaded the PBIX file I used this time below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you collinq
Hi, SAGUILAR
Based on your description, I created a simple dataset:
You mentioned that the column you are currently showing is a metric, so I simply created a measure as follows:
In order to sum only the positive values in total, I created a measure using the following DAX expression while keeping the original measure:
MEASURE =
IF (
ISINSCOPE ( 'Table'[Id] ),
'Table'[Amounts],
SUMX ( FILTER ( 'Table', 'Table'[Amounts] >= 0 ), 'Table'[Amounts] )
)
Here are the results:
I've uploaded the PBIX file I used this time below.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.