4 Replies Latest reply on Oct 29, 2018 1:21 PM by David Gibson

How to associate an avg value to a set of specific dates

First Im a total NOOB.

Here is the issue I have actions taking place over a course of time. Lets say Running....

So Person X runs 1000 miles from March 1st to March 10th.

Avg per day is 100 miles per day

How do I associate

March 1 with avg 100 miles and

March 2 with avg 100 miles and

March 3 with avg 100 miles ....

Then repeat this process for person X year round and Person y,z,w

My goal is to make a table showing

Sum Total for each day of the month/quarter/year based each days average for all runners.

• 1. Re: How to associate an avg value to a set of specific dates

Hi, David

To achieve this, you need either do a join in query level to a calendar table or in tableau data source level as shown below with a calendar table

I use tableau data source join as example below

A sample workbook with smaller sample data as example attached for your reference.

Hope this helps

ZZ

• 2. Re: How to associate an avg value to a set of specific dates

Zhouyi,

It worked....but when i do this with my large data set it took all my data and repeated anything that happened on each of those days and spread it out.

Used to be a single row for

Run Alpha Runner x Start distance 0  Start date jan 1 Stop distance100 stop date jan 10

Now its

Run Alpha Jan 1 Runner x Start distance 0  Start date jan 1 Stop distance100 stop date jan 10

Run Alpha Jan 2 Runner x Start distance 0  Start date jan 1 Stop distance100 stop date jan 10

Run Alpha Jan 3 Runner x Start distance 0  Start date jan 1 Stop distance100 stop date jan 10

Run Alpha Jan 4 Runner x Start distance 0  Start date jan 1 Stop distance100 stop date jan 10

Now my runner has done 10x what happened previously

Help

• 3. Re: How to associate an avg value to a set of specific dates

Hi, David

Can you make up some data but reflect your above issue and share the workbook?

ZZ

• 4. Re: How to associate an avg value to a set of specific dates

Take a look.

If you take out the calendar element all the data goes back to normal.

David