Forum Discussion
SAGUILAR
2 years agoFrequent Visitor
Sum only positive
Hello, I'm triying to show the total of the positive values only from a measure (Inv. Expected) that I created that substracts and sums several columns. In this scenario, the total includes ...
- 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.