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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Ibrahim_shaik
Helper V
Helper V

How to create a Clustered, Stacked Column Chart

Hi Power Bi Community,

 

I Created a clustered and stacked column chart with a measure and a category table. but there is one issue with it I have to add a column in the X axis field and it shows in the visual vertically which i don't like. Is their any other alternative method to create a cluster and stacked column chart.

 

This is the clustered and stacked column chart that i created below.

 

Screenshot 2025-08-14 164754.png

I only want the Phase labels but because of the group column the Payable and Receivable label is also getting displayed in the visual for each phase, which i want to remove.

 

Please provide a solution for this.

 

Thank you.

 

Regards,

Ibrahim. 

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

Hi @Ibrahim_shaik 

You’ve got two different needs in one visual:

  1. Cluster by Group (Payable vs Receivable), and

  2. Stack by Category within each Group,
    but you only want Phase shown on the X-axis (no Group labels repeated under every Phase).

Power BI’s built-in visuals can’t do “clustered + stacked” together, and most marketplace “clustered & stacked” visuals force a hierarchical X-axis (so you see both Phase and Group). Here are three workable solutions—pick the one that best fits your constraints:

Option A — Deneb (Vega-Lite) custom visual (cleanest, full control)

Deneb lets you build a true clustered-stacked chart and only show Phase on the axis.

Data model expected:
Fields: Phase (text), Group (Payable/Receivable), Category (your stack segments), Value (measure).

Steps:

  1. Add the Deneb visual from AppSource.

  2. Bind your dataset (Phase, Group, Category, Value).

Paste this Vega-Lite spec (it clusters by Group and stacks by Category, hides group labels, and shows only Phase):

{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "dataset"},
"encoding": {
"x": {"field": "Phase", "type": "nominal", "axis": {"labelAngle": 0, "title": null}},
"xOffset": {"field": "Group"},
"y": {"field": "Value", "type": "quantitative", "stack": "zero", "axis": {"title": null}},
"color": {"field": "Category", "type": "nominal"},
"order": {"field": "Category"}
},
"mark": {"type": "bar"},
"config": {
"bar": {"size": 14},
"axis": {"grid": false}
}
}

  • x = Phase (only Phase labels show)

  • xOffset = Group (creates the cluster within each Phase)

  • color = Category (creates the stack)

  • Adjust bar.size as needed.

This gives you exactly what you described, without the duplicated “Payable/Receivable” labels on the axis.

Option B — Two synced stacked column charts (no code, native)

If you can’t use Deneb:

  1. Create two standard Stacked column charts with Axis = Phase, Legend = Category, Values = Value.

  2. Filter one visual to Group = Payable; filter the other to Group = Receivable (via visual-level filters).

  3. Place them side-by-side tightly to mimic clustering:

    • Turn off X-axis labels on the right visual, keep them on the left.

    • Turn off Y-axis on the right visual.

    • Match data colors and inner padding so columns align.

You’ll see only Phase under the (left) axis; no repeated Group labels.

Option C — “Positive/Negative” split (fastest, if acceptable)

If your audience can read Payable vs Receivable as below/above zero:

  • Make Receivable values positive and Payable values negative (two measures or in Power Query).

  • Use a Stacked column chart with Axis = Phase, Legend = Category, Values = Value.

  • Color rules: positives (Receivable) one palette, negatives (Payable) another.

This keeps only Phase on the axis; you lose side-by-side clustering but gain a clean single-axis view.

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



View solution in original post

2 REPLIES 2
johnbasha33
Super User
Super User

Hi @Ibrahim_shaik 

You’ve got two different needs in one visual:

  1. Cluster by Group (Payable vs Receivable), and

  2. Stack by Category within each Group,
    but you only want Phase shown on the X-axis (no Group labels repeated under every Phase).

Power BI’s built-in visuals can’t do “clustered + stacked” together, and most marketplace “clustered & stacked” visuals force a hierarchical X-axis (so you see both Phase and Group). Here are three workable solutions—pick the one that best fits your constraints:

Option A — Deneb (Vega-Lite) custom visual (cleanest, full control)

Deneb lets you build a true clustered-stacked chart and only show Phase on the axis.

Data model expected:
Fields: Phase (text), Group (Payable/Receivable), Category (your stack segments), Value (measure).

Steps:

  1. Add the Deneb visual from AppSource.

  2. Bind your dataset (Phase, Group, Category, Value).

Paste this Vega-Lite spec (it clusters by Group and stacks by Category, hides group labels, and shows only Phase):

{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {"name": "dataset"},
"encoding": {
"x": {"field": "Phase", "type": "nominal", "axis": {"labelAngle": 0, "title": null}},
"xOffset": {"field": "Group"},
"y": {"field": "Value", "type": "quantitative", "stack": "zero", "axis": {"title": null}},
"color": {"field": "Category", "type": "nominal"},
"order": {"field": "Category"}
},
"mark": {"type": "bar"},
"config": {
"bar": {"size": 14},
"axis": {"grid": false}
}
}

  • x = Phase (only Phase labels show)

  • xOffset = Group (creates the cluster within each Phase)

  • color = Category (creates the stack)

  • Adjust bar.size as needed.

This gives you exactly what you described, without the duplicated “Payable/Receivable” labels on the axis.

Option B — Two synced stacked column charts (no code, native)

If you can’t use Deneb:

  1. Create two standard Stacked column charts with Axis = Phase, Legend = Category, Values = Value.

  2. Filter one visual to Group = Payable; filter the other to Group = Receivable (via visual-level filters).

  3. Place them side-by-side tightly to mimic clustering:

    • Turn off X-axis labels on the right visual, keep them on the left.

    • Turn off Y-axis on the right visual.

    • Match data colors and inner padding so columns align.

You’ll see only Phase under the (left) axis; no repeated Group labels.

Option C — “Positive/Negative” split (fastest, if acceptable)

If your audience can read Payable vs Receivable as below/above zero:

  • Make Receivable values positive and Payable values negative (two measures or in Power Query).

  • Use a Stacked column chart with Axis = Phase, Legend = Category, Values = Value.

  • Color rules: positives (Receivable) one palette, negatives (Payable) another.

This keeps only Phase on the axis; you lose side-by-side clustering but gain a clean single-axis view.

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



Hi @johnbasha33 ,

 

Thank you so much for providing different ways to solve the issue.

 

I have resolved this issue.

 

Thank you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors