Forum Discussion
juan_pablo
Helper V
7 years agosubstract 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
Super User
7 years agoIt'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_pablo
Helper V
7 years agoThank 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.