Hello Syed Ahmed,
This question is a couple weeks old but I wanted to see if you found a solution.
If the data was structured differently so that the holidays and data are in the same file (or joined to create a single data source) then the desired view could be created with a few calculated fields.
see the attached workbook with the example of this in use.
I realized that I created this in version 8.3 which was released this week. You can download this version from here if you have not already.
I have modified the data source to include a holiday line for each employee Name/Holiday combination. Then it is possible to to create a line per "Name" and limit the size of this line to start and end on Today and today+3 months using calculation functions for Datediff and Dateadd.
[Start Date New] is calculated as:
When "Work" then
If [Start Date]>today() then [Start Date] else today() End
When "Holiday" then
If [Start Date]<today() then null else [Start Date] end
and the number of days to 3 months from now is calculated as:
Finally, the size of the line is calculated to only show the next three months as a max value for each line:
Iif(datediff('day',[Start Date],[End Date])>[days to three months from now],[days to three months from now],datediff('day',[Start Date],[End Date]))
The Holidays are demarked by color in the view and appear as Blue as long as the color legend has "Holiday" appear above "Work".
I hope this helps provide some ideas for you about the things you can do with Tableau and ways to think about working with Data.
Test pv.twbx 45.1 KB
Thank you so much Pat, This is really helpful.
Is there a way we can have some kind of join to do this, Because I have huge data and will be difficult to populate in one single sheet along with Holidays.
Based on this two tables if we can come up with on Table which gives 1 entry for each day for each employe and resource type. :-)
(Not sure if SQL helps .. Trying that as well.. :-)