Forum Discussion

drivero's avatar
drivero
Helper I
2 years ago
Solved

Measure to Isolate Negative values group by

Hi there!   I would like to Isolate the total value Group by Country which are negative in global:     In this case, like Italy's Total is negative, I would like to be shown as 0 and then ...
  • AlexisOlson's avatar
    2 years ago

    One approach is to check if country is in scope (false for the total line):

    IF (
        ISINSCOPE ( DimCustomer[Country] ),
        [TotalAmount],
        SUMX ( VALUES ( DimCustomer[Country] ), [TotalAmount > 0] )
    )