Forum Discussion

jackypatel's avatar
jackypatel
Helper I
1 year ago
Solved

Need YTD Sum

As per Below table

 

MonthValueYTDLogic
Apr-23278.5278.5Apr-23
May-23181.9460.4Apr-23+May-23
Jun-23147.5607.9Apr-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

  • 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.