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

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

Reply
Snagalapur
Helper IV
Helper IV

how to handle zero or null values in measure

Hi All,

Please suggest how to handle zero or null values in below measure

Snagalapur_0-1732622308072.png

 

Snagalapur_1-1732622359289.png

Thank you.

1 ACCEPTED SOLUTION
Jai-Rathinavel
Super User
Super User

@Snagalapur  you can set the zero values as blank like below expression

 

Sales =

var num = SUM(Table[Sales])

var den = SUM(Table[Gross])

var a = DIVIDE(num,den,0)

return

IF(a == 0, BLANK(), a)

 

Thanks,

Jai

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

Use the DIVIDE function rather than the / operator.

Jai-Rathinavel
Super User
Super User

@Snagalapur  you can set the zero values as blank like below expression

 

Sales =

var num = SUM(Table[Sales])

var den = SUM(Table[Gross])

var a = DIVIDE(num,den,0)

return

IF(a == 0, BLANK(), a)

 

Thanks,

Jai

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you for help.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors
Users online (5,812)