Forum Discussion
Michael92
4 years agoFrequent Visitor
Calculate today cases
Hello all, I would like to count the number of cases for today and if there is an empty value, write zero. I have already created these measures, but how to connect them together and create one ...
- 4 years ago
OK, now it works. Only a few parentheses needed to be added.
MyMeasure =
var Count_today = CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ), 'case'[date] = TODAY ())
return
IF(
ISBLANK(Count_today),0,(Count_today)
)Thank you 😊
Michael92
4 years agoFrequent Visitor
The syntax for 'returnif' is incorrect 🙄
Too many arguments were passed to the ISBLANK function. The maximum argument count for the function is 1.
Michael92
4 years agoFrequent Visitor
OK, now it works. Only a few parentheses needed to be added.
MyMeasure =
var Count_today = CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ), 'case'[date] = TODAY ())
return
IF(
ISBLANK(Count_today),0,(Count_today)
)
Thank you 😊