Forum Discussion

diaz_edinson's avatar
diaz_edinson
Frequent Visitor
5 years ago
Solved

Multiple True / False filter expression

Hi, I am trying to create a measure that sums the cost values, filtering by string type columns that contain certain parameters, however, although the measure theoretically has no errors, it is givi...
  • diaz_edinson's avatar
    diaz_edinson
    5 years ago

    the reason I used CONTAINSSTRING is that the text contains the arguments "ff" or "do". but I solved it using this:

     

    Cost = 
    VAR NESFF =
        CALCULATE(
            SUM(FACTS[Cost]),
            FILTER(
                FACTS,
                IF(
                    CONTAINSSTRING(LOWER(FACTS[Campaign name]),"ff") ||
                    CONTAINSSTRING(LOWER(FACTS[Creative]),"ff")  || 
                    CONTAINSSTRING(LOWER(FACTS[Ad content]),"ff") ||
                    CONTAINSSTRING(LOWER(FACTS[Ad content]),"PUB"), 1, 0
                )=0
            )
        )
    RETURN
    NESFF

     

    Regards