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 i...
  • kpost's avatar
    1 year ago

    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///