Forum Discussion
Anonymous
3 years agoNot applicable
Need help with YTD Measure
Hi,
I've been asked to build a report that includes a YTD per accountID measure that'll be responsive to slicers (ie, if the user selects March in the slicer, the report will show the YTD value in March).
To do this, I'm going to need to build a calcuated column to sum the YTD for each accountID, excluding P13-Close period. I've looked at previous YTD questions, but I'm not confident with DAX and struggling to make it work. I'm not able to share my actual data, but the below is a representative example.
| AccountID | Rev Value | Date | PeriodName |
| 123 | 3224 | 01/01/2023 | P04-Jan |
| 235 | 53232 | 19/02/2023 | P05-Feb |
| 235 | 34 | 05/05/2023 | P08-May |
| 780 | 4441 | 17/03/2023 | P06-Mar |
| 123 | -123 | 30/06/2023 | P13-Close |
| 780 | 32113 | 20/07/2023 | P010-Jul |
| 780 | -32113 | 31/07/2023 | P13-Close |
1 Reply
- sergej_og
Super User
Maybe this one can help.
Try this to apply to yout model.TotalYTD = TOTALYTD( SUM(your_table[Rev Value]), 'Calendar'[Date])'Calendar' is a dimension table.
hope you got the idea.