2 Replies Latest reply on Jan 6, 2015 12:35 AM by kettan

    How to caliculate public holidays ?

    vamsi manohar

      PFA for public holidays ...i need to caliculate holidays from start date and end date .

       

      help me out ...

        • 1. Re: How to caliculate public holidays ?
          Rishabh Dhingra

          Hi Vamsi,

           

          You can create a calculated field and write a calculation End Date - Start Date in Tableau. Let me know if the below is what you are looking for:-

           

          Difference.JPG

          • 2. Re: How to caliculate public holidays ?
            kettan

            If data is in Excel, you could use the COUNTIFS function in Excel:

             

            =COUNTIFS(holidays.B$2:B$29;">=" & C2;holidays.B$2:B$29;"<=" & D2;holidays.D$2:D$29;">=2";holidays.D$2:D$29;"<=6")

             

            The formula excludes weekends. You need another calculation for counting Sundays and Saturdays.

             

            See more in attached spreadsheet.

             

            Ps.

             

            I just looked at your  question history  and like to commend you for making a wise move toward asking smaller questions which eventually will enable you to complete your bigger task. Although the complete task is well described in  Employee Utilization Report,  I think it is a too big task for volunteer helpers, at least that was my thought when I read it first time and therefore didn't touch it.

             

            Said differently, If you don't know how to count weekends for a period in Excel, I recommend you to make another small question for that. And after that the next small question and so on. I used this "small question strategy" when I needed to know how to make a  Chain-ladder table.  Because of its complexity, I didn't expect to get an answer anyway, but surprisingly did. I don't think I would if I added all issues in one question.