Forum Discussion
matrix
- 2 years ago
Hi Anonymous
To show both years in this case you should use the date table + time intelligence functions.Basic measure ( can be used as a current year)
total_sales = sum('Table'[Sales])Measure for the previous year:PY sales = CALCULATE([Quotes#],SAMEPERIODLASTYEAR('Calendar'[Date]))Marking calendar as a date table :Result:
Pbix is attached
More detailed tutorial to creating dates table:
https://www.datacamp.com/tutorial/how-to-create-date-tables-in-power-bi-tutorial
More detailed tutorial to YOY calculations:
https://www.youtube.com/watch?v=J4h17Kqyj4M
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Anonymous
To show both years in this case you should use the date table + time intelligence functions.
Basic measure ( can be used as a current year)
Result:
Pbix is attached
More detailed tutorial to creating dates table:
https://www.datacamp.com/tutorial/how-to-create-date-tables-in-power-bi-tutorial
More detailed tutorial to YOY calculations:
https://www.youtube.com/watch?v=J4h17Kqyj4M