Forum Discussion
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.
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.
You’ve got two different needs in one visual:
-
Cluster by Group (Payable vs Receivable), and
-
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:
-
Add the Deneb visual from AppSource.
-
Bind your dataset (Phase, Group, Category, Value).
Paste this Vega-Lite spec (it clusters by
Groupand stacks byCategory, 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.sizeas 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:
-
Create two standard Stacked column charts with
Axis = Phase,Legend = Category,Values = Value. -
Filter one visual to Group = Payable; filter the other to Group = Receivable (via visual-level filters).
-
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 !!
-
2 Replies
- johnbasha33Super User
You’ve got two different needs in one visual:
-
Cluster by Group (Payable vs Receivable), and
-
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:
-
Add the Deneb visual from AppSource.
-
Bind your dataset (Phase, Group, Category, Value).
Paste this Vega-Lite spec (it clusters by
Groupand stacks byCategory, 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.sizeas 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:
-
Create two standard Stacked column charts with
Axis = Phase,Legend = Category,Values = Value. -
Filter one visual to Group = Payable; filter the other to Group = Receivable (via visual-level filters).
-
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 !!
- Ibrahim_shaikHelper V
Hi johnbasha33 ,
Thank you so much for providing different ways to solve the issue.
I have resolved this issue.
Thank you.
-