Forum Discussion
o59393
Post Prodigy
2 years agoYTD vs Previous YTD
Hi all I have the following table: I am doing the sum of YTD and I am trying to compare it with the same period of last year (2023) but the values for PY YTD are wrong: ...
- 2 years ago
PBI file attached.
Hope this helps.
Power_Track100
2 years agoNew Member
Hi o59393,
Please find the below solution:
Measure 1= YTD = CALCULATE( SUM('My table'[Units]), DATESYTD('My table'[Date]) ) Measure 2= YTD LY = CALCULATE ( [YTD], SAMEPERIODLASTYEAR('My table'[Date]) ) |
********************Please accept this as a solution***************************
- o593932 years ago
Post Prodigy
I got values repeated:
Dax used:
PY YTD AC = CALCULATE( [YTD AC], SAMEPERIODLASTYEAR( Query1[Date] ) )Just in case, my dates are always 1/1/2023, 2/1/2023, 3/1/2023.... 2/1/2024
Appreciate your help
- Power_Track1002 years agoNew Member
o59393 could you please sahe a sample file. I think this will help to support you?