Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Prior Year to Date Billable

I'm trying to calculate the Prior Year to date for comparision

 

To get the Current YTD

 

YTD Billable = CALCULATE(SUM(Utilisation[ChargeableHours]), DATESBETWEEN('Work Date'[Date],DATE(2021,11,1),TODAY()))
 
I'm not sure how calculate the prior YTD, I have the first part but I'm not sure how to end it
 
20/21 YTD Billable Hours = CALCULATE([Chargeable Hours], DATESBETWEEN('Work Date'[Date], DATE(2020,11,1), ))
  • Anonymous 

    If you add a calendar table to your model you can us your existing meausre and the SAMEPERIODLASTYEAR like this.

    PYTD Billable = 
    CALCULATE ( [YTD Billable], SAMESPERIODLASTYEAR ( Dates[Date] ) )
  • Anonymous's avatar
    Anonymous
    4 years ago

    jdbuchanan71 

     

    I'm not sure i put it in right I got the same numbers

    20/21 YTD Billable Hours = CALCULATE([YTD Billable], SAMEPERIODLASTYEAR('Work Date'[Date]))

     

     

     

7 Replies

  • Anonymous 

    If you add a calendar table to your model you can us your existing meausre and the SAMEPERIODLASTYEAR like this.

    PYTD Billable = 
    CALCULATE ( [YTD Billable], SAMESPERIODLASTYEAR ( Dates[Date] ) )
    • Anonymous's avatar
      Anonymous
      Not applicable

      jdbuchanan71 

       

      I'm not sure i put it in right I got the same numbers

      20/21 YTD Billable Hours = CALCULATE([YTD Billable], SAMEPERIODLASTYEAR('Work Date'[Date]))

       

       

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      jdbuchanan71 

       

      Okay is there another way to calculate it. I'm at a law firm and the calendar year is Nov - Oct. 

       

      Thanks, 
      Karrie

  • You can use CALENDARAUTO(10) to generate a calendar table with a year end in October but you need a dedicated calendar table that is flagged for the time intelligence to work correctly.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you, 

       

      But that won't work, I'm in a live data connection and am not able to create tables

      • V-lianl-msft's avatar
        V-lianl-msft
        Icon for Community Support rankCommunity Support

        Hi Anonymous ,

         

        The formula in the third reply should work normally. Is the date field in the visual from 'Work Date'? If not, try using the date field in the 'Work Date'

         

        Best Regards,
        Liang
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.