Forum Discussion

juan_pablo's avatar
juan_pablo
Helper V
7 years ago
Solved

substract dax

Hi,  I'm trying to do a simple thing: just substract one unit (1) from a measure, but when I do this, the rows become all rows of the model as the imagen shows: the result must be 7 and 2 in the TWO...
  • AlexisOlson's avatar
    7 years ago

    It's subtracting 1 even from all of the rows that return a blank count.

     

    Try something like this instead:

     

    Ahorro=
    VAR Cnt = COUNT('(5) MR Header Fields'[srnScnNumber])
    RETURN IF(ISBLANK(Cnt), BLANK(), Cnt - 1)