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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.