cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III

## Assigning Start & End for Year To Day Calculation

Hi All,

I have a set of data which like below. Right now, I would like to calculate the Year to Day by Fiscal Year (Starting from 1st April). Is it possible to calculate the YTD by starting from Fiscal Year and end from four month before max month?

Like below example, I would like to sum from (2021-04 to 2021-07). Then later when I got the data for 2021-08, the YTD will sum from (2021-04 to 2021-08). Thank you.

 Date Amount 2020-12 10 2021-01 20 2021-02 30 2021-03 40 2021-04 50 2021-05 60 2021-06 70 2021-07 80 2021-08 90 2021-09 100 2021-10 110
1 ACCEPTED SOLUTION
Super User

@KH_Mike , Based on what I got.

You can use datesytd

YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD('Date'[Date],"3/31"))

You can have these column in date tbale

Start Year = STARTOFYEAR('Date'[Date],"3/31")

End Year = ENDOFYEAR('Date'[Date],"3/31")

Super User

@KH_Mike , Based on what I got.

You can use datesytd

YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD('Date'[Date],"3/31"))

You can have these column in date tbale

Start Year = STARTOFYEAR('Date'[Date],"3/31")

End Year = ENDOFYEAR('Date'[Date],"3/31")

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors