7 Replies Latest reply on Jun 6, 2016 3:27 PM by Alexander Mou

# How to make a line chart using start date and due date?

For my case, there is no specific date in dimension against the metrics(Estimated Hours). I need to make a line chart (similar as below chart) shows how many total estimated hours each month for all IDs. For each ID, estimated hours per month is calculated by [Estimated Hours]/DATEDIFF('month',[Start Date],[Due Date]). But I have no idea how to create a date dimension as the month, and how to distribute the estimated hours to each month. Please help!

Data source is attached.

Thank you very much!

• ###### 1. Re: How to make a line chart using start date and due date?

Tracy,

Due date has specific hours, as I see in the data set. But not in Start

Date.

Shall we count the hours? Or we can count the days and then multiply the

number by 24 or by 8?

Also, there is no rule about weekends and holidays. Shall we count them or

exclude them?

Please clarify before we can count.

On Mon, Jun 6, 2016 at 11:25 AM, Tracey Dong <tableaucommunity@tableau.com>

• ###### 2. Re: How to make a line chart using start date and due date?

Let's don't worry about hours, weekends and holidays right now. I may work on them later if required.

Right now I need ideas how to make it happen. Main issue: how to distribute the estimate hours to each month between start date and due date? for all IDs.

Thank you!

• ###### 3. Re: How to make a line chart using start date and due date?

This tutorial will help you estimate exactly how many IDs there are at a given date

Vizible Difference: Counting Active Orders via Pivot

Say, if you have 56 IDs at a given date, then you have 56x8 hours.

Let me know if you have further questions.

• ###### 4. Re: How to make a line chart using start date and due date?

Hi Alex,

I went through the workbook you mentioned. It includes the Year Original as the date dimension. You may calculate the month using Year Original. With my case, I need a date dimension I may use to calculate Month. It's not start date, neither is due date. How do I create Month as x axle?

• ###### 5. Re: How to make a line chart using start date and due date?

After pivot, you will have both due date and start date in the same Date column.

Month and Year are part of the date hierarchy.

As long as Date is the dimension, you will have either.

You can expand or collapse Date to have either.

• ###### 6. Re: How to make a line chart using start date and due date?

Hi Alex,

I found a similar post here Re: Divide a value between months

What I did was creating a lookup table manually and then create the date dimension using it. Same as above solution. And it was solved.

Thank you very much!

• ###### 7. Re: How to make a line chart using start date and due date?

Awesome!

On Mon, Jun 6, 2016 at 3:09 PM, Tracey Dong <tableaucommunity@tableau.com>