Forum Discussion

AUDISU's avatar
AUDISU
Resolver III
4 years ago
Solved

Use Text Column to IF Statement

Hi, Im new to Power bi and tring to write a DAX function with IF condition. Ex.   Product Amount A 1500 B 2000 C 3000   My formula to calculate value IF('ProductList'[Product] ...
  • tamerj1's avatar
    tamerj1
    4 years ago

    AUDISU 
    Please use

    =
    SWITCH (
        SELECTEDVALUE ( 'ProductList'[Product] ),
        "A", 1500,
        "B", 2000,
        "C", 3000,
        0
    )