Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

IFERROR from Excel to Power BI

Hello All,

 

coudl you please advise which function can be used in Power BI for this Excel: 

=IFERROR(IF((L334-K334)>0;0;L334-K334);0) 

where:

K is ordered qty

L is delivered qty

 

Thanks a lot in advance fro your help.

 

  • hi, Anonymous 

    When you changed coma to semicolon, there is a mistake.  Just try this formula

    change the coma to semicolon for the red part of formula

    Column = IF('Dax formulass'[ordered qty]-'Dax formulass'[delivered qty]>0, 0 ,'Dax formulass'[ordered qty]-'Dax formulass'[delivered qty]) +0

    Result:

     

    and here is sample pbix file, please try it.

     

    Regards,

    Lin

5 Replies

  • Anonymous try following, add new column 

     

    New Column = 
    IF ( Table[Column1] - Table[Column2] > 0, 0, Table[Column1] - Table[Column2] ) + 0
    • Anonymous's avatar
      Anonymous
      Not applicable
      And why to use if and not Iferror in power bi? Thanks
    • Anonymous's avatar
      Anonymous
      Not applicable

      parry2k I have mistake using your formula. And why not to use iferror for this? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I've changed coma to semicolum, but there works only 1st part and when delivered is more, it's not calculating. Coudl you please advise what can be wrong? thanks 

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

        hi, Anonymous 

        When you changed coma to semicolon, there is a mistake.  Just try this formula

        change the coma to semicolon for the red part of formula

        Column = IF('Dax formulass'[ordered qty]-'Dax formulass'[delivered qty]>0, 0 ,'Dax formulass'[ordered qty]-'Dax formulass'[delivered qty]) +0

        Result:

         

        and here is sample pbix file, please try it.

         

        Regards,

        Lin