Forum Discussion
Need YTD Sum
As per Below table
| Month | Value | YTD | Logic |
| Apr-23 | 278.5 | 278.5 | Apr-23 |
| May-23 | 181.9 | 460.4 | Apr-23+May-23 |
| Jun-23 | 147.5 | 607.9 | Apr-23+May-23+Jun-23 |
Continue till Mar-24
And Same will start for Apr-24
Plz help to resolve this
Hi jackypatel - You can use DAX to calculate the YTD values.This approach also calculates the YTD value but uses a filtering logic to include only months within the same fiscal year.
YTD Value =
CALCULATE(
SUM(Table[Value]),
DATESYTD(
Table[Month],
"03-31" // End of fiscal year (March 31)
)
)I hope you have a calendar table created in your model. please replace the same and place the value field.
2 Replies
- rajendraongole1Super User
Hi jackypatel - You can use DAX to calculate the YTD values.This approach also calculates the YTD value but uses a filtering logic to include only months within the same fiscal year.
YTD Value =
CALCULATE(
SUM(Table[Value]),
DATESYTD(
Table[Month],
"03-31" // End of fiscal year (March 31)
)
)I hope you have a calendar table created in your model. please replace the same and place the value field.
- jackypatelHelper IThank you