3 Replies Latest reply on Feb 11, 2016 8:36 AM by Shinichiro Murakami

    Get number of days from the date range filter/slider to use in the report

    Kumar Sambhuni

      Is there a way to get the number of days from the date range slider (filter) and use it in a calculation?

       

      The date range slider originates from a single date dimension.

       

      This number, whenever the report user slides/moves the date slider, should be supplied to the report for calculations.

       

      Example: A date range slider on a "Time Sheet report" for a company of 3 employees. Each employee works 8 hours a day (measure).

       

      Data from the database:

      Emp123 worked 8 hrs each on 1/25/2016, 1/26/2016, 1/27/2016,1/28/2016

      Emp135 worked 8 hrs each on 1/25/2016, 1/26/2016, 1/27/2016,1/28/2016, 1/29/2106

      Emp146 worked 8 hrs each on 1/25/2016, 1/27/2016

       

      Slider: Start date 1/25/2016... End date 1/29/2016

      Report should show:

      Empl_Name, Total_Anticipated_Work_Hours, Actual_Work_Hours

      Emp123, 5 days x 8 = 40 hrs, 4days x 8 = 32 hrs

      Emp135, 5 days x 8 = 40 hrs, 5days x 8 = 40 hrs

      Emp146, 5 days x 8 = 40 hrs, 2days x 8 = 16 hrs

       

      Slider changed to: Start 1/27... Ends 1/29

      Report should show:

      Empl_Name, Total_Anticipated_Work_Hours, Actual_Work_Hours

      Emp123, 3 days x 8 = 24 hrs, 2days x 8 = 16 hrs

      Emp135, 3 days x 8 = 24 hrs, 3days x 8 = 24 hrs

      Emp146, 3 days x 8 = 24 hrs, 1days x 8 = 8 hrs