Forum Discussion
Year over Year in area chart
- 3 years ago
Hi lbendlin
Thanks for your reply.
However I did manage to resolve it myself by doing the following:
Step 1. Implemented the following 3 measures:
# Calculate this Year-to-day accumulative total using TOTALYTD
Units YTD =
IF(
ISBLANK([Units]), BLANK(),
TOTALYTD([units], 'DateTable'[Date]))
# Calculate sum units in the same-period-last-year
Units LY = CALCULATE([Units], SAMEPERIODLASTYEAR(DateTable[Date]))
# Calculate last year accumulative total using [Units LY] with TOTALYTD
Units LYTD = TOTALYTD([Units LY], 'DateTable'[Date])
Step 2. Extended the date table to the end of this year i.e. 2023-12-31
Which yielded the following result
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Hi lbendlin
Thanks for your reply.
However I did manage to resolve it myself by doing the following:
Step 1. Implemented the following 3 measures:
# Calculate this Year-to-day accumulative total using TOTALYTD
Units YTD =
IF(
ISBLANK([Units]), BLANK(),
TOTALYTD([units], 'DateTable'[Date]))
# Calculate sum units in the same-period-last-year
Units LY = CALCULATE([Units], SAMEPERIODLASTYEAR(DateTable[Date]))
# Calculate last year accumulative total using [Units LY] with TOTALYTD
Units LYTD = TOTALYTD([Units LY], 'DateTable'[Date])
Step 2. Extended the date table to the end of this year i.e. 2023-12-31
Which yielded the following result