Forum Discussion

LaurenL's avatar
LaurenL
New Member
8 years ago
Solved

DAX function to Excel "Choose"

Hi,   Hoping someone might have run into a similar issue before.   I'm using the below Excel formula to populate cell rows with the "Choose" function.    IF((GM$9-$AW10)>0,CHOOSE(GM$9-$AW10,$AY...
  • v-huizhn-msft's avatar
    v-huizhn-msft
    8 years ago

    Hi LaurenL,

    Even through you post the full formula in excel, it's still hard to reproduce your scenario, you'd better create sample table and list expected result. For Choose function in excel, you can use SWITCH function in DAX.

    For example, I use the Choose funtion in excel as follows.



    In Power BI desktop, you can use SWITCH function in DAX to create a calculated column as follows.

    Output = SWITCH(Test[Input],1,"red",2,"blue",3,"green")



    For if function, you can still use it in DAX, more details, please review this blog: https://msdn.microsoft.com/en-us/library/ee634824.aspx.

    Best Regards,
    Angelia