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

show negative data as dash (-) and plot at 0 in line chart power bi

Hi, 

 

I want to show the neagtive data as dash ("-") and it should be plotted at zero in line chart. When I hover over the line, negative data should be shown as dash (-) in tooltip. How can I do this? right now what happens is, I could convert negative to dash using measure but then it is not displayed on the chart.

 

Measure I created is:

TotalQuantity = IF(CALCULATE(SUM(Table[Quantity]))<=0,"-",CALCULATE(SUM(Table[Quantity])))

 

Regards,

Janki

 

1 ACCEPTED SOLUTION

hi, @Anonymous 

After my research, I'm afraid that it difficult to achieve in power bi for now.

Text value couldn't display in line chart and you want show (-) in tooltip.

If you could try use tooltips based on report pages, use TotalQuantity = IF(CALCULATE(SUM(Table[Quantity]))<=0,"-",CALCULATE(SUM(Table[Quantity]))) for tooltip and use new TotalQuantity = IF(CALCULATE(SUM(Table[Quantity]))<=0,0,CALCULATE(SUM(Table[Quantity]))) for visual value.

https://docs.microsoft.com/en-us/power-bi/desktop-tooltips

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
kcantor
Community Champion
Community Champion

@Anonymous 

Make sure the visual has "Show Items with No Data" marked. Otherwise, the visual will hide rows where there is no data. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@kcantor ,

Thank you for your reply. however, I am not able to find this option in measure. Does this option also come when there is a measure?

 

Regards,

Janki

hi, @Anonymous 

After my research, I'm afraid that it difficult to achieve in power bi for now.

Text value couldn't display in line chart and you want show (-) in tooltip.

If you could try use tooltips based on report pages, use TotalQuantity = IF(CALCULATE(SUM(Table[Quantity]))<=0,"-",CALCULATE(SUM(Table[Quantity]))) for tooltip and use new TotalQuantity = IF(CALCULATE(SUM(Table[Quantity]))<=0,0,CALCULATE(SUM(Table[Quantity]))) for visual value.

https://docs.microsoft.com/en-us/power-bi/desktop-tooltips

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.