Forum Discussion

paris's avatar
paris
Helper V
7 years ago
Solved

CALCULATETABLE

Hi All,

 

I would like to select Apple, Orange and Banana's sales in 2018. How can I add Orange and Banana to the following formular?

 

2018 = CALCULATETABLE(Sales,Sales[Year]=2018, Sales[Product]="Apple")
 
All the best,
Paris
  • Hi paris

    You can use the expresion below.

    CALCULATETABLE(
        Sales,
        Sales[Year] = 2018, 
        Sales[Product] IN {"Apple", "Orange", "Banana"}
    ) 

    Hope this helps
    Mariusz

  • paris's avatar
    paris
    7 years ago

    Thank you very much! It saved my time a lot. 

2 Replies

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi paris

    You can use the expresion below.

    CALCULATETABLE(
        Sales,
        Sales[Year] = 2018, 
        Sales[Product] IN {"Apple", "Orange", "Banana"}
    ) 

    Hope this helps
    Mariusz

    • paris's avatar
      paris
      Helper V

      Thank you very much! It saved my time a lot.