1 2 Previous Next 21 Replies Latest reply on Jul 2, 2018 2:30 PM by Dan Cory

# How To create a calculated field that will give me the total of all numbers.

hey everyone I am trying to create a calculated field to add all the numbers present:

here is a screen shot of the numbers I want to add. I want to accomplish this using a calculated filed.

I am using the following but I don't get the total for the resutls results

ZN([UNKNOWN COUNT])+ZN([FEMALE COUNT])+ZN([MALE COUNT])

• ###### 1. Re: How To create a calculated field that will give me the total of all numbers.

Try this and let us know if this is what you're looking for,

TOTAL(SUM(ZN([Unknown])+ZN([Female Count])+ZN([Male Count])))

Thanks,.

Shiva.

• ###### 2. Re: How To create a calculated field that will give me the total of all numbers.

unfortunately I get the following

argument to sum the function cannot be aggregated further

• ###### 3. Re: How To create a calculated field that will give me the total of all numbers.

If the data is already aggregated, Tableau won't be able to aggregate it further. Can you attach a packaged workbook?

• ###### 4. Re: How To create a calculated field that will give me the total of all numbers.

You need an LOD for that. Please attach a simple sample workbook to Help u.

Thanks

Deepak

• ###### 5. Re: How To create a calculated field that will give me the total of all numbers.

hey everyone thanks for the help, unfortunately I am unable to attach a workbook at this time.

• ###### 6. Re: How To create a calculated field that will give me the total of all numbers.

Try to Use This

• ###### 7. Re: How To create a calculated field that will give me the total of all numbers.

Ok Do this to get Single value

See attached

Thanks

Deepak

• ###### 8. Re: How To create a calculated field that will give me the total of all numbers.

thank you Deepak I still get an error: I tried the following

TOTAL((ZN([UNKNOWN COUNT])+ZN([FEMALE COUNT])+ZN([MALE COUNT]))) but now I get a total of 8640

which is not close 2881

thank you everybody for the help

• ###### 9. Re: How To create a calculated field that will give me the total of all numbers.

this is what I have :

for male count I have the following:

(

IF [total male] >= 1

THEN [count]

END )

for the total male I have the following:

SUM([male gender])

and for male gender I have the following:

if [Gender] ='M'

then 1

END

hope this helps

• ###### 10. Re: How To create a calculated field that will give me the total of all numbers.

Do you have some fake data to create this. I would help..only fake similar data

• ###### 11. Re: How To create a calculated field that will give me the total of all numbers.

I will try to put it on an excel sheet and will post it.

• ###### 12. Re: How To create a calculated field that will give me the total of all numbers.

here is the attachment

• ###### 13. Re: How To create a calculated field that will give me the total of all numbers.

Pl Check

I Hope It Helps. Pl check sheet 7 and 8

If it Helps, Pl mark it Helpful and CORRECT to close Thread

Thanks

Deepak

• ###### 14. Re: How To create a calculated field that will give me the total of all numbers.

hey Deepak thanks for your help unfortunately it does not work gives me a wrong number

1 2 Previous Next