Forum Discussion
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
to filter all ref_id that starts with CRII TB card_ as shown in the image above. thanks.
- Anonymous3 years ago
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?
- Anonymous3 years ago
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
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 _val3. add a table visual with field and measure
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.
3 Replies
- AnonymousNot applicable
Hi Anonymous ,
Please try below steps:
1. below is my test table
Table:
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 _val3. add a table visual with field and measure
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. - bolfri
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.
- AnonymousNot 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?