Forum Discussion
How to filter a data by Column and by Row?
- 1 year ago
Hi,
In the Power Query Editor, right click on the first column and select "Unpivot Other Columns". Now create your desired visuals.
If your column headers (like Fact.Malayu, Fact.Sales, etc.) represent values you want to filter by, the best way to handle this is to unpivot those columns in Power Query. This turns the sector headers into row values, which makes filtering by both a row (e.g., a specific month) and a column (e.g., a sector) straightforward.
Here’s how you can do it: Go to Power Query Editor. Select all the sector columns (those with actual values). Right-click and choose "Unpivot Columns".
You’ll now get three columns. One for the month (your original row ID), One for the sector (was originally your column header), and One for the value (e.g., the sales/amount).
Now you can use slicers or filters to easily isolate a specific sector for a specific month just like picking a cell by row and column in Excel, but the Power BI way.
- Syndicate_Admin1 year ago
Administrator
Hello! Thank you for your help.
I have a billing table with columns by sector and rows by month.
I can add a filter by date.. but not by sector because it is the name of the column. it is not table data.
- Ashish_Excel1 year ago
Solution Supplier
Hi,
In the Power Query Editor, right click on the first column and select "Unpivot Other Columns". Now create your desired visuals.