3 Replies Latest reply on Jul 17, 2018 10:21 AM by Nic G

# Best way to calculate this ? (I'm going Bonkers)

I'd like to get a distinct count of the date for each different client, and then divide the data by that distinct count....

eg.

 01/07/2018 a_client 100 02/07/2018 a_client 89 03/07/2018 a_client 5 04/07/2018 a_client 44 05/07/2018 a_client 55 06/07/2018 a_client 85 07/07/2018 a_client 42 08/07/2018 a_client 1 09/07/2018 a_client 77

For a_client we see 9 unique dates, so first row would be 100/9 = 11.11

and then so one for each client (bare in mind the # of dates will be different for each client).

I'm struggling to to get either a distinct row count or date count in the first instance :-(

Appreciate anyone's help, pretty please :-)

Nicky x

• ###### 1. Re: Best way to calculate this ? (I'm going Bonkers)

Good morning

see the attached

returns this

this is pretty basic to tableau - if yo haven't seen the online training try the link   Tableau Training: View Training Courses

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: Best way to calculate this ? (I'm going Bonkers)

Jim's post above works. Posting an alternative using table calcs in case you have a large dataset and want to avoid using LOD and going against the database.

Here's how I calculated number of dates per Client:

Or seen in the sheet:

Then I simply combined the new measures to create the new value desired and placed in the Text pane:

Attached a 10.3 twbx for your viewing. Hope this helps!

Best,

Bryce

1 of 1 people found this helpful
• ###### 3. Re: Best way to calculate this ? (I'm going Bonkers)

Thanks Bryce, Jim gave me answer first but I'll probably use your method as it's a huge Dataset.