Forum Discussion

tksnota01's avatar
tksnota01
Frequent Visitor
1 year ago
Solved

Filter Start With

Hi,

 

I have a number column showing profit centre.

 

I want the user to have the option to filter the column that starts with the first 2 digits like "19", "14", etc.

 

Is this possible even if the column only contains number?

 

Thanks...tksnota01...

 

 

 

 

  • This solution allows you to filter the page using the first two characters of the number. You can also just add this value as the top layer of a slicer hierarchy if you want to eliminate the need for users to 'search' using their keyboard for the first two numbers, as the other user suggested.

     

      I created a table with some of these numbers.

     

    Then in Power Query I used "Extract" to get the first two characters in a new column:

     

    Then I created a slicer using this new column in the report.  Here you can see me using it to filter on 14% and 19%.

     

     

     

    Here it is using a multi-level hierarchy for the slicer:

     

     

    Attached is the .pbix file solution.

     

    ///Mediocre Power BI Advice, but it's free///

4 Replies

  • SEMattis's avatar
    SEMattis
    Advocate III

    Hi!

    Could you not solve this by enabling the search function in the slicer?  To enable it hover over the slicer and click the three dots at the top left corner. Then enable the search!

     

    • tksnota01's avatar
      tksnota01
      Frequent Visitor

      will this feature work for columns containing numbers? I tried this approach but i can't make it work...

  • kpost's avatar
    kpost
    Solution Sage

    This solution allows you to filter the page using the first two characters of the number. You can also just add this value as the top layer of a slicer hierarchy if you want to eliminate the need for users to 'search' using their keyboard for the first two numbers, as the other user suggested.

     

      I created a table with some of these numbers.

     

    Then in Power Query I used "Extract" to get the first two characters in a new column:

     

    Then I created a slicer using this new column in the report.  Here you can see me using it to filter on 14% and 19%.

     

     

     

    Here it is using a multi-level hierarchy for the slicer:

     

     

    Attached is the .pbix file solution.

     

    ///Mediocre Power BI Advice, but it's free///

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tksnota01 ,

     

    Thank you for reaching out to Microsoft Fabric Community.

    kpost SEMattis Thank you for your quick response.

     

    we would like to follow up to see if the solution provided by the super users kpost SEMattis  resolved your issue. Please let us know if you need any further assistance.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

    Regards,
    B Manikanteswara Reddy