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)
Anonymous
7 years agoNot applicable
HI juan_pablo,
Matrix visuals will auto hide blank records(you can right click on row or column fields and choose 'show item with no data' to force display them).
When you add "-1" or other calculation on it, it will try to transform blank value as zero then calculate with numeric value you define.
So I'd like to suggest you add condition on category column to ignore calculate on records which not has value.
Regards,
Xiaoxin Sheng