Forum Discussion

Kratchie's avatar
Kratchie
Frequent Visitor
3 years ago
Solved

Search with multiple words

Hi, 

 

How can I make search like this

 

If it finds Australia = TRUE

If it finds both Australia + USA, then it should be TRUE

If it finds only USA, then it should be FALSE as result.

 

 

 

COLUMN = 
IF (
ISBLANK ( SEARCH ( "Australia", MERGE[DESCRIPTION], 1, BLANK () ) ),
"FALSE",
"TRUE"
)

 

 

 

  • Hi,

    In order to get the true /false result as per the mentioned conditions, you can try below DAX expression on the report.

    Column = IF(SEARCH("Australia", 'Test Table'[Name], 1, 0) = 1, IF(SEARCH ("USA", 'Test Table'[Name], 1, 0)=1,TRUE(),TRUE()) , IF(SEARCH ("Australia", 'Test Table'[Name], 1, 0) =1,FALSE()) )


    Please refer to the below screenshot for the same.

     

    If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.


    Thanks!

    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop an email at [email protected]

    Service:  http://www.inogic.com/services/  

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

4 Replies

  • Hi,

    In order to get the true /false result as per the mentioned conditions, you can try below DAX expression on the report.

    Column = IF(SEARCH("Australia", 'Test Table'[Name], 1, 0) = 1, IF(SEARCH ("USA", 'Test Table'[Name], 1, 0)=1,TRUE(),TRUE()) , IF(SEARCH ("Australia", 'Test Table'[Name], 1, 0) =1,FALSE()) )


    Please refer to the below screenshot for the same.

     

    If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.


    Thanks!

    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop an email at [email protected]

    Service:  http://www.inogic.com/services/  

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

  • ppm1's avatar
    ppm1
    Solution Sage

    Please try this instead.

    COLUMN = 
    IF (
    SEARCH ( "Australia", MERGE[DESCRIPTION], 1, 0 ) > 0,
    "TRUE",
    "FALSE"
    )

    Pat