Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
madhushree
Frequent Visitor

0 needs to be displayed instead of blank using measure

Hi All,

 

I am calculating a measure something like below:

measure1=calculate(count(id),filter(table1,flag=1))

But this measure displays blank when flag is not 1, all i want is it should display 0.

Tried below measures:

1.  measure2=if(table1.flag=1,count(id),0)

2.  measure3=if(isblank([measure1]),0,count(id))

3. measure4=[measure1]+0

All the measures gives too many records due to join of tables.

 Can someone please give the solution for this.

 

Thanks in advance,

Madhushree

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

@madhushree

 

Hi Madhushree,

 

Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

measure1 = VAR var1=calculate(count(id),filter(table1,flag=1))
RETURN(IF(ISBLANK(var1),0,var1))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors