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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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