Last answered:

08 Nov 2022

Posted on:

25 Feb 2022

1

Resolved: Filter in calculate with multiple values

The given example filter only one value (color=silver)
Can you in the same line specify multiple values?
Would that look like:
TotalSalesProductItem = CALCULATE([TotalSales], FILTER(dim_Product, dim_Product[color] = ["Silver","Black","Blue"]

to display the Total sales for the list of products in the brackets?

2 answers ( 1 marked as helpful)
Instructor
Posted on:

25 Feb 2022

1

If you would like to have multiple values filtered, please use the IN  {"color A", "color B", "color C"}

Posted on:

08 Nov 2022

0

TotalSalesProductItem = CALCULATE([TotalSales], FILTER(dim_Product, dim_Product[color] IN {"Silver","Black","Blue"}))
this works for me

Submit an answer