Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Sum and partial match

I want to sum partial match. Below formula works fin but I want to add more criteria. When counting for partial match I use IN {"criteria1", "criteria2"} - this is not working in this case. THX   ...
  • v-easonf-msft's avatar
    5 years ago

    Hi , Anonymous 

    "Search" returns the number of the character at which a specific character or text string is first found, reading left to right. Search is case-insensitive and accent sensitive.

     

    Here you can  use "CONTAINSSTRING" function to indicate whether one string contains another string.

     

    measure1 =
    CALCULATE (
        SUM ( Salg[Net Invoiced Quantity in Base UOM] ),
        CONTAINSSTRING (
            Salg[Product Name],
            "Combi Port E D-X"
        )
            || CONTAINSSTRING ( Salg[Product Name], "Test" )
    )
    

     

     

    Best Regards,
    Community Support Team _ Eason