2 Replies Latest reply on Mar 23, 2016 10:09 AM by Shilfa Liyakathali

# Creating ZN(Lookup( ___ ),0) function calculation based on another calculation.

Hey, Tableauverse.

I am trying to replace all empty entries with a 0 using the ZN(Lookup) calculation, but am having trouble joining this calculations with another calculation, which I have below.

IF [Dash Board Analysis] ="BEDS (CAMAS)"

and [Dashboard Category] != 'TOTAL HOSPITAL BEDS (TOTAL DE CAMAS)'

and [Dashboard Category] != 'TOTAL AMBULATORY BEDS (NUMERO DE CAMAS EN AREA DE AMBULATORIO - "NO CENSABLES")'

then { INCLUDE [Dashboard Category],[C7 Hospital Name (Nombre Del Establecimiento / De La Sede)]:SUM([Amount])}

END

Anyone care to chime in?  I'm stumped.

• ###### 1. Re: Creating ZN(Lookup( ___ ),0) function calculation based on another calculation.

Hey Victor,

Welcome to the community! Would it be possible to know a little more about your issue?

A screenshot of the error would help a lot!

A sample workbook (if available) would help even more, though!

Thanks!

- Derrick

• ###### 2. Re: Creating ZN(Lookup( ___ ),0) function calculation based on another calculation.

Hey, Derrick. Thank you for the quick response!

I apologize if you have received other notifications for postings; I deleted them because I figured out how to create the calculation. I labeled the above calculation as "AB - Bed calculation..." and then created another calculation that looks like this: ZN(LOOKUP(SUM[AB - Bed Calculation...]),0).  The image below shows it at work.

I do have a  follow-up question, however.

The reason I created this calculation is because all these entries are going to be filtered by parameters. I needed the blank entries to have a zero so that the parameters would not intentionally exclude them.

The image below shows me trying to create a condition for the filter, but I keep on getting these errors: