Forum Discussion

jaryszek's avatar
jaryszek
Icon for Super User rankSuper User
4 years ago
Solved

DAX to use LIKE statement

Hi Guys,

 

i have dax like here:

Day 9 = 
    CALCULATE(
        AVERAGEX(
            VALUES(
                Orders[OrderID]),
                [Total sales]
        ),
    FILTER(
        Customers,
        Customers[CompanyName] = "Romero y Tomillo"
    )
    )

 

and what i want to use is to get Customers[CompanyName] LIKE "Romero*",
how to do this in DAX?

Best,
Jacek

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Jacek,

    Try using below as a filter condition:

    CONTAINSSTRING('Customers'[CompanyName], "Romero")

     

    Thanks,

    Shephali

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Jacek,

    Try using below as a filter condition:

    CONTAINSSTRING('Customers'[CompanyName], "Romero")

     

    Thanks,

    Shephali