The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 measure?
Solved! Go to Solution.
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 😊
Hi @Michael92 ,
I don't think you need the second measure if I understand correctly.
Try following:
MyMeasure =
var Count_today = CALCULATE (DISTINCTCOUNT ( 'case'[id_case] ), 'case'[date] = TODAY ())
return
IF(
ISBLANK(Count_today,0,Count_today)
)
The syntax for 'returnif' is incorrect 🙄
Too many arguments were passed to the ISBLANK function. The maximum argument count for the function is 1.
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 😊
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |