8 Replies Latest reply on Mar 19, 2016 2:16 AM by Mahfooj Khan

# How to get zero in graph if we dont have data for particular field

How can i display 0.0% above 4,  we dont have any data for 4th week.

• ###### 1. Re: How to get zero in graph if we dont have data for particular field

Hello Sanjeev,

I do not have version 9 yet so it's hard for me to open your workbook but please use this tutorial, it will help you

Populating Empty Cells with Zeros or Existing Data | Tableau Software

• ###### 2. Re: How to get zero in graph if we dont have data for particular field

You mean this?

• ###### 3. Re: How to get zero in graph if we dont have data for particular field

yes exactly

I need to show this in bar graph as percentage 0.0%

• ###### 4. Re: How to get zero in graph if we dont have data for particular field

Okey first you will have to add a calculate field , like this (put anyname that you want to the field)

zn(lookup(sum([HERE IS WHERE YOU PUT THE MEASURE THAT YOU WANT TO SHOW]),0))

and then you add that field to the rows finnally, on your ccolumn field select the opton "show missing values".

With all that it has to work.

p.s: sorry for my english

• ###### 5. Re: How to get zero in graph if we dont have data for particular field

Hi,

What if the null values are present in the start or end? In that case it does not replace it with zero.

Can you please guide me on how to achieve that?

For example in your screenshot it does not replaces may'14 to zero.

• ###### 6. Re: How to get zero in graph if we dont have data for particular field

Hi Bhavesh,

Please use the ZN function in order to convert null values to zero.

Suppose you are having a column sales. Then you can write it ZN(Sales).

This will serve the purpose to your problem.

-

Ashish Chaudhari

1 of 1 people found this helpful
• ###### 7. Re: How to get zero in graph if we dont have data for particular field
1 of 1 people found this helpful
• ###### 8. Re: How to get zero in graph if we dont have data for particular field

hi sanjeev,

You can use ZN() function to replace null values with zero. In the earlier post ashish has mentioned that.

Mahfooj