Using the IN operator in DAX and not working

Hey guys,

I’m trying to transform this code into a DAX measure:

if (Column1 in ("Value1","Value2"...."ValueN") then [Revenue] else 0)

I need to calculate the (sum(FactT[revenue]), filter(FactT,FactT[Column1] in (“Value1”,“Value2”…“Value3”))).

Other than IN, can anyone here suggest a function that I can use?

Thanks in advance! :smile:

you can try:

   CALCULATE(
    [Total Revenue].
    Table[Column] IN {"Value1", "Value2"}
)

Enterprise%20DNA%20Expert%20-%20Small

Yes a solid understanding of CALCULATE is required here.

This is some fundamental learning that you should jump into as soon as you can.

Here’s some links to review.

http://portal.enterprisedna.co/courses/mastering-dax-calculations/lectures/2000577

https://blog.enterprisedna.co/tag/calculate/

Good luck!

Sam