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
juanahumada
Frequent Visitor

How can I get the YTD but adding only last day of the previous year

Hi Guys,

 

I am working in a report based in periods where the fisrt period goes from 31-12-2017 to  27-01- 2018, but when I want to get the YTD sales with the formula TOTALYTD the 31-12-2017 is out of the result.

 

How can I calculate the YTD including the last day of the year 2017 and not including the last 2 days of Dicember of 2018.

 

Thank you!!

Juan Ignacio  

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi juanahumada,

 

You can use DAX like this pattern instead.

YTD =
CALCULATE (
    aggregation,
    FILTER ( table, table[date] > date1 && table[date] < date2 )
)

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi juanahumada,

 

You can use DAX like this pattern instead.

YTD =
CALCULATE (
    aggregation,
    FILTER ( table, table[date] > date1 && table[date] < date2 )
)

Regards,

Jimmy Tao

thank you!!!

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.