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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX measure to show zeros in Line Graph

There has to be a simple solution to this, how do I continue the orange line to show 0's?

Capture.PNG

 

This graph is showing the # of Items and the # of items who have a QTY greater than 1. 

The line graph is a measure to calcuate the total QTY if the QTY is greater than 1.

How do I get it to show the zeros? Ex: the line for feb should not break, it should continue to the bottom and then back up for March.

 

My measure is this:

MEASURE = CALCULATE(SUM('Table'[QTY]), 'Table'[QTY]>1)
 
I read that all I have to do is add +0 at the end. THIS DOES NOT WORK. This is what happens:
Capture2.PNG
 
 
It technically works, but adds a junk in the front and the back and completly ignores the date filter I have set up.
 
OH and people are like just change the graph type to continous to linear. Well, that does not show up as an option for me in my X-Axis. wish i could, but can't
 
THIS SHOULD BE SO SIMPLE. my measure is simple. Why is this so hard? I have probably tried to figure this out for atleast 12 hours. Help PLEASE.
 
1 ACCEPTED SOLUTION

@Anonymous try updaing your measure like this

 

MEASURE = 
(CALCULATE(SUM('Table'[QTY]), 'Table'[QTY]>1) + 0 ) *
DIVIDE( [Total # of Items], [Total # of Items] )

Assuming you have [Total # of Items] measure in your model that you are using for bar



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

Can you share the pbix, or a simplified version that reproduces the problem? 

@Anonymous try updaing your measure like this

 

MEASURE = 
(CALCULATE(SUM('Table'[QTY]), 'Table'[QTY]>1) + 0 ) *
DIVIDE( [Total # of Items], [Total # of Items] )

Assuming you have [Total # of Items] measure in your model that you are using for bar



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

 

@parry2k  You a lifesaver - I knew it had to be something simple like that. THANK YOU!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.