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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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