Forum Discussion
Dynamic Column Width in Matrix Visual Based on Area (Similar to Stacking Plan View)
Hi Community,
I’m working on a Matrix visual in Power BI and trying to achieve a layout similar to a Stacking Plan style view.
Current Matrix Setup
Rows: Floor Code
Columns: Tenant sequence / numbering (Tenant 1, Tenant 2, Tenant 3, etc.)
Values:
Tenant Name
Rent
Area
Lease Expiry Date
At the moment, all columns in the Matrix have equal width, regardless of the tenant’s area.
Business Requirement
My manager wants the column width to dynamically change based on the tenant’s Area, similar to a stacking plan visualization where space allocation is proportional.
Example:
For a single floor (one row):
Tenant 1 - Area = 300
Tenant 2 - Area = 200
Tenant 3 - Area = 400
Tenant 4 - Area = 100
All 4 tenants together should occupy 100% of the row width, but:
Tenant 3 (largest area) should have the widest column
Tenant 1 should be smaller than Tenant 3
Tenant 2 smaller than Tenant 1
Tenant 4 the smallest
So the column widths should be proportional to the Area values, dynamically adjusting when data changes.
What I’m Trying to Achieve
Make a Matrix visual behave like a stacking plan
Dynamically allocate column width based on a measure (Area)
Width adjustment should work within the same row (Floor Code)
Question
Is it possible in Power BI to dynamically control Matrix column width based on a measure?
If not, is there any workaround, such as:
Any other recommended approach to replicate this behavior?
Any guidance or suggestions would be greatly appreciated.
Thanks in advance!
8 Replies
- lbendlinSuper User
If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com
- krishnakanth240Super User
No, Power BI cannot dynamically change column width based on a measure.
Work around you can try with Stacked bar which gives proportional widths, Deneb (Vega-Lite) custom visual that has control over proportional layout. - v-tejramaCommunity Support
Hi Venugopalchari ,
Thanks for reaching out to the Microsoft fabric community forum.Thank you for sharing your requirements in detail. This situation is common when working with stacking plans or space allocation in Power BI. Currently, the Matrix visual does not allow dynamic adjustment of column widths based on measures such as Area. Its grid layout keeps each column at a fixed width, which cannot be changed using DAX or calculated values. Therefore, the Matrix visual is not ideal for proportional or spatial representations within a row.
This feature is frequently requested, so I suggest submitting your idea to the Power BI Ideas forum for the product team's review.
You can submit and track suggestions here: https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas
Your input helps guide future improvements.Best Regards,
Tejaswi.
Community Support- v-tejramaCommunity Support
Hi Venugopalchari ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.- v-tejramaCommunity Support
Hi Venugopalchari ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.
- kushanNaSuper User
you can use power bi inbuilt python visual to create these types of visual
I have attached sample pbix file I have created for your reference
to create , edit you will need to install python into your machine, check this tutorial : https://www.youtube.com/watch?v=3_DOF_qjguA
if you only want to view this visual simply publish it into your workspace and you can view it
- HarishKMSuper User
Venugopalchari Hey,
Short answer: No — Power BI Matrix column widths cannot be driven by a measure. Matrix columns are fixed/auto-sized uniformly and can’t vary per row based on Area.
Effective workarounds
1) Native, simple: 100% Stacked Bar chart
- Y-axis: Floor Code
- Legend: Tenant
- Values: Area (SUM)
- Result: Each floor row totals 100%; tenant segment widths are proportional to Area.
- Add a tooltip page to show Tenant Name, Rent, Area, Lease Expiry on hover.
- Note: Legend order is global (not per floor). If you need per-row sorting of segments, see Option 2.
2) Best control: Deneb (Vega-Lite) or Charticulator custom visuals
- You can build a true “stacking plan” with dynamic segment widths, per-floor sorting (largest to smallest), labels inside segments, and tooltips.
- This matches your requirement most closely.
3) Native but advanced: SVG in a Table visual
- Create a DAX measure that returns an inline SVG (data:image/svg+xml) drawing a horizontal stacked bar per floor (rectangles sized by Area).
- Place Floor Code in rows and the SVG measure as an Image URL column.
- Gives a matrix-like layout with proportional widths; no extra custom visual needed.
Recommended setup (quickest to deliver)
- Start with a 100% Stacked Bar chart:
- Floor Code → Y-axis
- Tenant → Legend
- Area (SUM) → Values
- Add a tooltip page with Tenant Name, Rent, Area, Lease Expiry.- If you need per-floor sorting of segments, switch to Deneb/Charticulator.
Thanks
Haish K
If I resolve your issue. Kindly give kudos to this post and accept it as a solution so other can refer this
- HarishKMSuper User
Venugopalchari Hey,
Short answer: No — Power BI Matrix column widths cannot be driven by a measure. Matrix columns are fixed/auto-sized uniformly and can’t vary per row based on Area.
Effective workarounds
1) Native, simple: 100% Stacked Bar chart
- Y-axis: Floor Code
- Legend: Tenant
- Values: Area (SUM)
- Result: Each floor row totals 100%; tenant segment widths are proportional to Area.
- Add a tooltip page to show Tenant Name, Rent, Area, Lease Expiry on hover.
- Note: Legend order is global (not per floor). If you need per-row sorting of segments, see Option 2.
2) Best control: Deneb (Vega-Lite) or Charticulator custom visuals
- You can build a true “stacking plan” with dynamic segment widths, per-floor sorting (largest to smallest), labels inside segments, and tooltips.
- This matches your requirement most closely.
3) Native but advanced: SVG in a Table visual
- Create a DAX measure that returns an inline SVG (data:image/svg+xml) drawing a horizontal stacked bar per floor (rectangles sized by Area).
- Place Floor Code in rows and the SVG measure as an Image URL column.
- Gives a matrix-like layout with proportional widths; no extra custom visual needed.
Recommended setup (quickest to deliver)
- Start with a 100% Stacked Bar chart:
- Floor Code → Y-axis
- Tenant → Legend
- Area (SUM) → Values
- Add a tooltip page with Tenant Name, Rent, Area, Lease Expiry.- If you need per-floor sorting of segments, switch to Deneb/Charticulator.
Thanks
Haish K
If I resolve your issue. Kindly give kudos to this post and accept it as a solution so other can refer this