Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Aleph18
Frequent Visitor

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")"

Capture.PNG

 

Capture1.PNG

 

 

 

 

Please advise,

 

 

 



1 ACCEPTED SOLUTION

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

Capture3.PNG

 

 

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
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"))

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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:

 

Capture2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

Kind regards,

 

Aleph18

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

Capture3.PNG

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.