Forum Discussion

apocryphal_pnda's avatar
apocryphal_pnda
Frequent Visitor
2 years ago
Solved

How do I create this chart?

Sorry, very new to PowerBI and DAX. I'm trying to create the chart below, but I'm not even sure what to search for. All I have to show is my stacked bar, but that lacks the 100% border as the chart below has.

 

 

 

  • Hi apocryphal_pnda 

    Just like in the picture, I doubt there's a way to achieve this with generic charts because for the label above the bar you need a cluster chart and for the filling bar effect you need a stacked chart.

    If a stacked chart with the filling effect is good enough, then you can achieve it with the following steps:

    1. create 3 measures :
    for basic sum by category :

    Sum_ = sum('Table'[Sales])
    For percent from total:
    % from total = divide ([Sum_],CALCULATE([Sum_],ALLSELECTED('Table'[Team])))
    For the "blank" part, the difference from 100%:
    delta_from_100% = 1-[% from total]
    Then put 2 last measures in the stacked graph:

    Next steps are dealing with format. 
    1. Switch off the legend and the X axis :

    2. Modify bars' colors:

    3. customize labels , put the absolute sum instead of percents :

    From this point on, you have a little bit left to improve the design. I hope the main idea is clear

    The pbix is attached

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

3 Replies

    • apocryphal_pnda's avatar
      apocryphal_pnda
      Frequent Visitor

      Thank you, I'll watch the video. And, yes this project is definitely a few steps above my experience level, deep end learning I guess

  • Hi apocryphal_pnda 

    Just like in the picture, I doubt there's a way to achieve this with generic charts because for the label above the bar you need a cluster chart and for the filling bar effect you need a stacked chart.

    If a stacked chart with the filling effect is good enough, then you can achieve it with the following steps:

    1. create 3 measures :
    for basic sum by category :

    Sum_ = sum('Table'[Sales])
    For percent from total:
    % from total = divide ([Sum_],CALCULATE([Sum_],ALLSELECTED('Table'[Team])))
    For the "blank" part, the difference from 100%:
    delta_from_100% = 1-[% from total]
    Then put 2 last measures in the stacked graph:

    Next steps are dealing with format. 
    1. Switch off the legend and the X axis :

    2. Modify bars' colors:

    3. customize labels , put the absolute sum instead of percents :

    From this point on, you have a little bit left to improve the design. I hope the main idea is clear

    The pbix is attached

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