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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kboud3
Helper I
Helper I

Creating stacked bar chart with excel table and wanting to filter by multiple columns

So I have two tables that show our monthly supply of inventory. We have two categories: New Construction and All Construction

month supply.png

 

The left table is New Const. and the right table is All Const. 

month supply chart.png

 

This is the chart I have created. The issue I am have is I want to have a slicer that consists of all the price ranges that are the column headers. So basically I want the price range slicer to show the appropriate value when selected. I'm not sure if I need to edit the entire table in power query or not. Thanks in advance! 

3 REPLIES 3
rubayatyasmin
Super User
Super User

Hi, @kboud3 

 

the best approach is typically to unpivot your data to transform your column headers into row values.

 

Table should look like 

 

Type Price Range Value

New Construction0-100K10
New Construction100K-200K15
New Construction200K-300K20
All Construction0-100K5
All Construction100K-200K10

All Construction

200K-300K15

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Will I be able to put the months on x-axis by doing that? I don't want to input any data because the excel spreadsheet will continuously be update. 

Hi @kboud3 ,

 

Unpivot your data does not affect the refresh of your data. Unpivot is a feature in Power Query that also doesn't enter new data. In Power Query, you can transform columns into attribute-value pairs, where columns become rows. More details refer to

Unpivot columns - Power Query | Microsoft Learn

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors