Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 |
Solved! Go to Solution.
@KH_Mike , Based on what I got.
You can use datesytd
YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD('Date'[Date],"3/31"))
Last YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"3/31"))
You can have these column in date tbale
Start Year = STARTOFYEAR('Date'[Date],"3/31")
End Year = ENDOFYEAR('Date'[Date],"3/31")
@KH_Mike , Based on what I got.
You can use datesytd
YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD('Date'[Date],"3/31"))
Last YTD Sales = CALCULATE(SUM(Table[Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"3/31"))
You can have these column in date tbale
Start Year = STARTOFYEAR('Date'[Date],"3/31")
End Year = ENDOFYEAR('Date'[Date],"3/31")
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |