Forum Discussion
juan_pablo
7 years agoHelper V
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...
- 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)
AlexisOlson
7 years agoSuper User
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)- juan_pablo7 years agoHelper V
Thank you very much! It works great.
If you have time, can you please explain me a little bit better why this happens and why your solution works?
If not, it's ok.
Thank you.