Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
3 years ago
Solved

FILTER NOT CONTAINS

Hi all!

Let's say I have a table with values and string.

In the column Article I have different strings.

Now I would like to calculate the SUM of the column Quantity but I would like to exclude 5 different articles here.

How would you do that in such a measure?

Sales :=
CALCULATE (
    [Sales Amount],
    'Sales'[Article] = "Table",
    'Sales'[Article] = "Desk"
)
  • Hi joshua1990 

    please try

    Sales :=
    CALCULATE (
        [Sales Amount],
        NOT ( 'Sales'[Article]
            IN { "Article1", "Article2", "Article3", "Article4", "Article5" } )
    )

1 Reply

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi joshua1990 

    please try

    Sales :=
    CALCULATE (
        [Sales Amount],
        NOT ( 'Sales'[Article]
            IN { "Article1", "Article2", "Article3", "Article4", "Article5" } )
    )