Forum Discussion

leisay's avatar
leisay
Frequent Visitor
6 years ago
Solved

Syntax for 'ROUNDDOWN' is incorrect when putting it into if function

I am trying to add a calculated column using the if function combined with rounddown function inside. I tested the runddown function, it was working. But when I put it into the if function and calculating with the result from the rounddown founction I get the error - The syntax for 'ROUNDDOWN' is incorrect. I don't know why this is incorrect. Any hint for me? 

 

 

 

 

Thank you!

  • leisay's avatar
    leisay
    6 years ago

    Thank you both for the help. Now I found where the problem is. It is because of the reginal setting on my computer. Now I changed it to english (united states). Now the syntax error is not showing anymore. ğŸ˜€

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi leisay ,

     

    Use the formula

     

    ttire per pal =
    IF (
    Masterdata[Tireoo_mm] > 750,
    DIVIDE (
    1250,
    ROUNDDOWN (
    Masterdata[DeflatedTire Width(494)],
    0
    )
    ) * 2,
    DIVIDE (
    1250,
    ROUNDDOWN (
    Masterdata[DeflatedTire Width(494)],
    0
    )
    ) * 4
    )

     

     

    Regards,

    Harsh Nathani

    • leisay's avatar
      leisay
      Frequent Visitor

      Dear Anonymous ,

       

      Thanks for the quick reply. Actually I want to round down the results of 1250 divided by MasterData[Deflated Tire Width], then multiply it by 2 or 4, depending on the result from the if condition. 

      I tested in steps:

       

      First I only use ROUNDDOWN(1250/MasterData[Deflated Tire Width(494)],0), it works out fine. 

      Then I added the if function, then it is shows the syntax incorrect error. 

       

      I just start to use powerBI. This formel seems quite simple and works in excel. But in PowerBI I keep getting this syntax error. This is a bit frastrating. 

      • AntrikshSharma's avatar
        AntrikshSharma
        Community Champion

        Try saving, closing and then re-opening the file, I recreated the same formula in my file and it showed no errors.