Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have the measure below. At the moment if there are no records that meet the criteria, the field will display the word 'Blank'. How could i amend it so it displays a zero '0' please?
= CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit]= "Yes")
@amitchandak @tamerj1 @danextian @goncalogeraldes
Solved! Go to Solution.
Hi @spandy34
You can do the following:
Measure=
var _myVar= = CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit]= "Yes")
return
IF(ISBLANK(_myVar),0,_myVar)
Hello @spandy34 ,
You can simply add 0 at the end of the measure.
Please check below measure to achieve the solution:
= CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit]= "Yes") + 0
Kindly accept it as a solution if it helps.
Check if this works?
Count Short Visit =
VAR ShortVisitCount =
CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit] = "Yes"
)
RETURN
IF(ShortVisitCount <> 0, ShortVisitCount, 0)
Great thank you
Check if this works?
Count Short Visit =
VAR ShortVisitCount =
CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit] = "Yes"
)
RETURN
IF(ShortVisitCount <> 0, ShortVisitCount, 0)
THank you it works
Hello @spandy34 ,
You can simply add 0 at the end of the measure.
Please check below measure to achieve the solution:
= CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit]= "Yes") + 0
Kindly accept it as a solution if it helps.
Thank you it works!
Hi @spandy34
You can do the following:
Measure=
var _myVar= = CALCULATE(
COUNTA('Procurement_Main_Data'[SSRef]),
'Procurement_Main_Data'[Short Visit]= "Yes")
return
IF(ISBLANK(_myVar),0,_myVar)
Thank you it works
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
95 | |
86 | |
78 | |
66 |
User | Count |
---|---|
157 | |
125 | |
116 | |
111 | |
95 |