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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
profilewatercli
Regular Visitor

If error return 0 in measure

hi all, i created a measure for my stacked line chart but i currently facing some issue in using the measure function. So i have a measure that looks like this 

Amount = 
DIVIDE(
	SUM('table1'[FP]),
	SUM('table1'[Amount])
)

however, since some of the year are 0 for both FP and Amount field, the stacked chart churns out as screenshot below.

profilewatercli_0-1711214292376.png

may i know if how should i rewrite the measure formula to make the stacked line chart link from 14 to 16? as i know that 0 divided by 0 is error.

 

Thanks! 

1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @profilewatercli 

Please use

 

Amount = 
DIVIDE(
	SUM('table1'[FP]),
	SUM('table1'[Amount]),
0
)

 

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

1 REPLY 1
PijushRoy
Super User
Super User

Hi @profilewatercli 

Please use

 

Amount = 
DIVIDE(
	SUM('table1'[FP]),
	SUM('table1'[Amount]),
0
)

 

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors