Forum Discussion

Oros's avatar
Oros
Post Prodigy
2 years ago
Solved

'Does not end with'

Hello,

 

I have a location table.  How do I filter (exclude) location that end in B?  Unfortunately, I could not find a filter for 'does not end with'.  Thanks.

 

 

 

  • Hi Oros 
    You can try the End With option in the Power Query editor

     


    Let me know if that works for you


    If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

    Thanks
    Pijush
    Linkedin

  • Create a Calculated Column:
    You can add a new calculated column to your table using the DAX function RIGHT combined with LEN to check the last character of each location. If it's "B", assign a value that signifies exclusion. Here's the DAX formula:

    FilteredLocation =
    IF(
        RIGHT('Table'[Column1], 1) = "B",
        BLANK(),
        'Table'[Column1]
    )

    Then you can hide blank from filter 
    If it helps Please Mark as a solution!
    For more Power BI Tips and Trick check out https://powertipstricks.blogspot.com/ blog

4 Replies

  • PijushRoy's avatar
    PijushRoy
    Community Champion

    Hi Oros 
    You can try the End With option in the Power Query editor

     


    Let me know if that works for you


    If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

    Thanks
    Pijush
    Linkedin

  • Create a Calculated Column:
    You can add a new calculated column to your table using the DAX function RIGHT combined with LEN to check the last character of each location. If it's "B", assign a value that signifies exclusion. Here's the DAX formula:

    FilteredLocation =
    IF(
        RIGHT('Table'[Column1], 1) = "B",
        BLANK(),
        'Table'[Column1]
    )

    Then you can hide blank from filter 
    If it helps Please Mark as a solution!
    For more Power BI Tips and Trick check out https://powertipstricks.blogspot.com/ blog