Forum Discussion

gvg's avatar
gvg
Post Prodigy
4 years ago
Solved

Help with IN

Hi folks,   Maybe someone could help me out in the following situation. I know that I can calculate Red and Green Sales with    CALCULATE ( [SalesAmount], Sales[Color] in {"Red", "Green"} )   ...
  • PC2790's avatar
    4 years ago

    Hey gvg ,

     

    Try using TREATAS:

     

    CALCULATE (
        [SalesAmount],
        TREATAS (
            VALUES ( ColorTable[Value] ),
            Sales[Color]
        )
    )

     I hope this gives you the desired result