Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
83 | |
82 | |
65 | |
49 |
User | Count |
---|---|
135 | |
111 | |
100 | |
65 | |
62 |