cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
mcoleman5
Regular Visitor

Stacked Bar Chart - Start at Zero, Don't Combine

I have a stacked bar chart that I want both stacked bars to start at zero. The columns are alarms, so the total bar is the total alarm count, and the sub bar is the acknowledged alarm count. The total count will always be either larger or at most the same as the acknowledged count. I want the bars to both start at zero, not stack on top of each other. In the example below, the first alarm has 89 total alarms and 26 acknowledged alarms. I want the overall bar to stop at 89, not 115 (89 + 26).

 

Do I have to create a separate column subtracting the values, or is there an easier way to do this?

 

 

mcoleman5_0-1647016287861.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @mcoleman5 ,

I created some data:

vyangliumsft_0-1647393428716.png

vyangliumsft_1-1647393428718.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    YEAR(MAX('Table'[Date]))=2021,MAX('Table'[amount]),0)

2. Result:

vyangliumsft_2-1647393428719.png

Best Regards,

Liu Yang

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

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @mcoleman5 ,

I created some data:

vyangliumsft_0-1647393428716.png

vyangliumsft_1-1647393428718.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
    YEAR(MAX('Table'[Date]))=2021,MAX('Table'[amount]),0)

2. Result:

vyangliumsft_2-1647393428719.png

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

lbendlin
Super User
Super User

"Do I have to create a separate column subtracting the values?" - yes

 

", or is there an easier way to do this?" -  Don't use stacked column charts, use clustered column charts.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors