Skip to main content

I am using this calculated field to show either a percentage beside a number with one place after decimal  OR a dash (--) if it is NULL.

IFNULL(STR(ROUND(SUM([Previous 2 Month: Avail%])/SUM([Previous 2 Month Units])*100,1))+"%","--")

 

This works fine in tableau desktop (10.1.8), but shows strange results like several places after decimal when the same dashboard is published on tableau server (10.1.4)

On tableau desktop, it shows 83.3%

When I publish on tableau server and open it in a web browser, it shows 83.29999999999997% (I didn't count number of repeating 9's)

Anyone faced this issue?

 

Note: If the result is NULL, it is correctly showing as -- on tableau server. Just additional information. No issue with this.

 

Thanks,

Mahesh

1 answer
  1. Oct 5, 2017, 4:14 PM

    Hi null,

     

    That is because you used a . instead of a , in your decimal.

    Change your points to commas and it should work properly.

     

    You could also change the Locale of the file to English, or non-English depending on if you want to use . or ,.

     

    Let me know if you need further assistance!

     

    ----------

    Lénaïc RIÉDINGER, Global Community Engineer Tableau

    Tableau Community Forums | Knowledge Base

    If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!

0/9000