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
o59393
Post Prodigy
Post Prodigy

How to visualize a 0 in a stacked bar chart

Hi all

 

How can I visualize a value of 0% in a stacked bar chart ?

 

As seen below it´s only showing values above 0:

 

eq0.JPG

 

I tried a table but it obly showed values above 0 too:

 

table-1.JPG

 

 

The formula I used to calculate those % values is:

 

KPI Sludge = 

VAR R1 =
CALCULATE(
COUNTROWS('Append (Sludge)'),
'Append (Sludge)'[Column]="IN")

VAR R2 =
CALCULATE(
COUNTROWS('Append (Sludge)'),
'Append (Sludge)'[Column]="OUT" || 'Append (Sludge)'[Column]="IN")

Return
DIVIDE(
    R1,R2
)

 

Basically you divide total In by total In + total out

 

Thanks !!

1 ACCEPTED SOLUTION
o59393
Post Prodigy
Post Prodigy

Hi

 

I solved it. Added a +0 to the divide function:

 

Return
DIVIDE(
    R1,R2
)+0

 

Regards!

View solution in original post

1 REPLY 1
o59393
Post Prodigy
Post Prodigy

Hi

 

I solved it. Added a +0 to the divide function:

 

Return
DIVIDE(
    R1,R2
)+0

 

Regards!

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.