Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Tableau calculation to DAX

Hi, Please help me to convert the following Tableau calculation in DAX.

 

IF IFNULL([Need Fm],0) < IFNULL([Need Im],0) THEN IFNULL([Need Fm],0) ELSE IFNULL([Need Im],0) END

 

Thank you!

  • Hi Anonymous ,

     

    Please try the calculated column.

     

    Column = 
    VAR _fm = COALESCE ( [Need Fm], 0 )
    VAR _Im = COALESCE ( [Need Im], 0 )
    RETURN IF ( _fm < _Im, _fm, _Im )

     


    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • v-kkf-msft's avatar
    v-kkf-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Please try the calculated column.

     

    Column = 
    VAR _fm = COALESCE ( [Need Fm], 0 )
    VAR _Im = COALESCE ( [Need Im], 0 )
    RETURN IF ( _fm < _Im, _fm, _Im )

     


    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous 

    could you pls provide the sample data and expected output?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous Hi Hari, Could you please help?