8 Replies Latest reply on May 6, 2016 11:14 AM by Tharashasank Davuluru

# Views shows empty instead of 0

Some times in tableau views if we don't have data it displays empty and I want to replace with 0.

I tried all functions but nothing is working out. Do you guys have any idea to do that?

Attached the screenshot below for reference

• ###### 1. Re: Views shows empty instead of 0

Hi Balaji,

To fix this issue you have to use the ZN Lookup function.

and also find the ZN_lookup workbook.

Thanks and Regards,

Rohan Malusare.

• ###### 2. Re: Views shows empty instead of 0

HI Balaji Kannan

Please have a look at this Kb article:Populating Empty Cells with Zeroes or Existing Data | Tableau Software

1 of 1 people found this helpful
• ###### 3. Re: Views shows empty instead of 0

Rohan,

Its like I always need to use SUM? Because am using COUNTD to take distinct count of plans.

Replacing SUM with COUNTD is not working out for me.

Any inputs greatly appreciated

• ###### 4. Re: Views shows empty instead of 0

Hi Balaji,

If you want to replace nulls with 0 then what rohan has suggested is right

Thanks and Regards,

Ashish Chaudhari

1 of 1 people found this helpful
• ###### 5. Re: Views shows empty instead of 0

I used the function above and am getting ZN is being called with (Integer,Integer), did you mean Integer?

• ###### 6. Re: Views shows empty instead of 0

Can you share sample workbook?

Regards,

Rohan Malusare.

• ###### 7. Re: Views shows empty instead of 0

Rohan,

I wont be able to share the workbook because it has big data source and calculation

• ###### 8. Re: Views shows empty instead of 0

Hi,

Try these calculations i have written in two ways:

first method of calculation: WINDOW_SUM(IIF(ATTR((LOOKUP([count of account/plans]),0))==IFNULL(LOOKUP(ATTR((LOOKUP([count of account/plans]),0)), -1)," "), 0, 1))

Second method of calculation: WINDOW_SUM(IIF(FIRST()==0, 1, IIF(ATTR((LOOKUP([count of account/plans]),0))==LOOKUP(ATTR((LOOKUP([count of account/plans]),0)), -1), 0, 1)))

1 of 1 people found this helpful