Forum Discussion
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
The left table is New Const. and the right table is All Const.
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
- rubayatyasminCommunity Champion
Hi, Anonymous
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 Construction 0-100K 10 New Construction 100K-200K 15 New Construction 200K-300K 20 All Construction 0-100K 5 All Construction 100K-200K 10 All Construction
200K-300K 15 - AnonymousNot applicable
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.
- AnonymousNot applicable
Hi Anonymous ,
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.