Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to use filter formula

hello.

how can I filter a value from a column that contains letters with tempering with the other columns e.g

Sadymum7470_0-1678399354732.png

to filter all ref_id that starts with CRII TB card_ as shown in the image above. thanks.

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

i want to filter in a measure, and i tried the containstring function but it didn't return anything. can you show me the full function PLEASE?

 

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1678775987330.png

2. create a mesure with below dax formual

Measure =
VAR _refslip =
    SELECTEDVALUE ( 'Table'[ref_slip] )
VAR _val =
    IF ( CONTAINSSTRING ( _refslip, "CRII TB card_" ), "True" )
RETURN
    _val

3. add a table visual with field and measure

vbinbinyumsft_1-1678776069734.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1678775987330.png

2. create a mesure with below dax formual

Measure =
VAR _refslip =
    SELECTEDVALUE ( 'Table'[ref_slip] )
VAR _val =
    IF ( CONTAINSSTRING ( _refslip, "CRII TB card_" ), "True" )
RETURN
    _val

3. add a table visual with field and measure

vbinbinyumsft_1-1678776069734.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

i want to filter in a measure, and i tried the containstring function but it didn't return anything. can you show me the full function PLEASE?

 

bolfri
Solution Sage
Solution Sage

https://learn.microsoft.com/en-us/dax/containsstring-function-dax

 

Do you want to filter it in a measure or create a calculated column? 🙂 Containsstring can do both.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.