Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
1 year ago
Solved

How to filter a data by Column and by Row?

Good afternoon

Do I need to filter a single piece of data by specifying the column and row? I can't find any simple filter to extract a specific piece of data from a table.

Thank you

Best regards.

  • Ashish_Excel's avatar
    Ashish_Excel
    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. 

6 Replies

  • Hi Syndicate_Admin 

     

    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_Admin's avatar
      Syndicate_Admin
      Icon for Administrator rankAdministrator

      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_Excel's avatar
        Ashish_Excel
        Icon for Solution Supplier rankSolution Supplier

        Hi,

        In the Power Query Editor, right click on the first column and select "Unpivot Other Columns".  Now create your desired visuals. 

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin ,

    Please follow the steps provided by Ashish_Excel , to create the desired visuals and test the solution. If it works for you, kindly consider marking the response as ‘Accept as Solution’ so it can help others facing similar issues.
    If the issue persists or you need further assistance, feel free to share more details for additional support.

     

    Thank you for your quick response rohit1991 .

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin ,

    I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.

    Thank you.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

     

    Thank you.