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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.