Forum Discussion

Aleph18's avatar
Aleph18
Frequent Visitor
8 years ago
Solved

YTD - CalendarAuto - exclude future sales dates

Hi,

 

How can I avoid having Sales YTD figures appearing for future months? 

I will like that YTD finishes in the last day of reported sales.

 

Date of Sales finishes in Jan, but calendarauto month continues until fiscal year end, on May. So YTD sales appear constant until May (incorrect).

 

For YTD Sales I used the following formula: "YTD Sales = TOTALYTD('Sales'[SalesS],DimDate[Date],all(DimDate[Date]), "5/31")"

 

 

 

 

 

Please advise,

 

 

 



  • I got the answer,  found the answer on an older query:

     

     

3 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Aleph18,

     

    One workaround is to display zero for future months.

    YTD Sales = IF([SalesS]=0,0,TOTALYTD(Sales[SalesS],DimDate[Date],all(DimDate[Date]), "5/31"))

     

    Best regards,

    Yuliana Gu

    • Aleph18's avatar
      Aleph18
      Frequent Visitor

      Hi Yuliana, 

       

      Thank you for your message. It is not working unfortunately. The graph should stop in Jan. Applying the proposed formula gave me the following:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      Kind regards,

       

      Aleph18

      • Aleph18's avatar
        Aleph18
        Frequent Visitor

        I got the answer,  found the answer on an older query: