6 Replies Latest reply on Sep 4, 2018 3:42 AM by MANOJ PRABHAKAR

# Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

• ###### 1. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Hi Manoj,

Create a calculation like below replace 6744 with 0 and quantity with the measure value you have Hope this helps

Plz mark this answer as correct and helpful to close the thread

BR,

NB

1 of 1 people found this helpful
• ###### 2. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Hello Manoj,

This article should help you with this.

Thanks
Rahul

2 of 2 people found this helpful
• ###### 3. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Hi Manoj,

Try this

if SUM([Sales])<.01 then ROUND(SUM([Sales]))

ELSE ROUND(SUM([Sales]),2)

END

Thanks

sankar

1 of 1 people found this helpful
• ###### 4. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

If you do this, set calculation format as automatic in order to work.

Grato, Luciano.

Enviado do meu iPhone

Em 3 de set de 2018, à(s) 08:30, Sankarmagesh Rajan <tableaucommunity@tableau.com> escreveu:

Tableau Community Forums

Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

resposta de Sankarmagesh Rajan em Forums - Visualize a discussão completa

Hi Manoj,

Try this

if SUM()<.01 then ROUND(SUM())

ELSE ROUND(SUM(),2)

END

Thanks

sankar

Responda a esta mensagem respondendo a este e-mail ou vá para a mensagem em Tableau Community Forums

Inicie uma nova discussão em Forums por e-mail ou em Tableau Community Forums

Seguindo Sankarmagesh Rajan nestes fluxos: Caixa de Entrada

Este e-mail foi enviado por Tableau Community Forums porque você é um usuário registrado. Você pode cancelar a assinatura da Tableau Community Forums agora mesmo ou ajustar a frequência de e-mail nas preferências do seu e-mail

• ###### 5. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Hi Manoj,

Here is a quick and easy way you can achieve that by using number formatting.

First navigate to the Number formatting option of the measure as shown below Choose custom, then paste this value as it is:

#,##0.00;-#,##0.00;#,##0

and you should get the desired formatting as shown below I hope this solves your issue.

Emmanuel.

1 of 1 people found this helpful
• ###### 6. Re: Tableau Calculations - How to hide the two decimal places for a zero, but all the other numbers should have the two decimal values

Perfect .. Thanks a lot Emmanuel Ikehi