locked
ROUND function to show blank RRS feed

  • Question

  • User-360635291 posted

    I have an expression that I just want it to show blank/nothing if it's negative from a ROUND function.  Is this possible?

    ROUND(IIF(a<b,"",4.2))

    In my Test, if a > b, I get 4 rounded and that's great but if a<b, it shows an error.  I understand it's because you can not round blank/nothing but is there a way around this?  I can put a value like 0 but I really want it to show nothing.

    Tuesday, November 27, 2012 4:29 PM

Answers

  • User2105670541 posted

    use:

    =iif(a<b,"",Round(4.2))



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 28, 2012 12:51 AM

All replies

  • User1625229839 posted

    Can you wrap it in another IIF and compare it to zero and if it is equal then make it blank, otherwise make it the value of the round?

    IIF(ROUND(IIF(a<b,0,4.2))=0,"",ROUND(IIF(a<b,0,4.2))) 

    Tuesday, November 27, 2012 4:55 PM
  • User-1716253493 posted
    IIF(a<b,"",ROUND(4.2))
    
    

    Tuesday, November 27, 2012 8:21 PM
  • User2105670541 posted

    use:

    =iif(a<b,"",Round(4.2))



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 28, 2012 12:51 AM