Forum Discussion

andreas789's avatar
andreas789
Frequent Visitor
4 years ago
Solved

Custom Year End Date on DATESYTD

Our fiscal year begins on the first Sunday of May.
 
Is it possible to have a custom year-end date (First Sunday of May - 1 Day) on DATES YTD function?
 

 

Fiscal YTD Net Sales = 

CALCULATE(SUM(sales[NET_SALES]), DATESYTD(periodsfulldata[Date]))

 

 

  • Hi, andreas789 

    Yes, use TOTALYTD fuction.

    Hope this helps.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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

5 Replies

  • Hi, andreas789 

    Yes, use TOTALYTD fuction.

    Hope this helps.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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

    • andreas789's avatar
      andreas789
      Frequent Visitor

      Thanks v-angzheng-msft but since our end date is not standard each year, is it possible to get the first Sunday of May from a powerbi function?

      • v-angzheng-msft's avatar
        v-angzheng-msft
        Icon for Community Support rankCommunity Support

        Hi, andreas789 
        Yes, try this:

        Measure = 
        var _currentYear=MAX('Table'[Year])
        return 
        CALCULATE(MIN('Table'[Date]),FILTER(ALL('Table'),'Table'[Year]=_currentYear&&MONTH('Table'[Date])=5&&WEEKDAY([Date],2)=7))

        Result:

        Please refer to the attachment below for details.

        Hope this helps.

         

         

        Best Regards,
        Community Support Team _ Zeon Zheng


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

  • Anonymous's avatar
    Anonymous
    Not applicable

    use (endofyear) function to createyear end date