Forum Discussion
Isgandar_B
4 years agoFrequent Visitor
Power BI YoY different tables
Hi dear community, I have a question related to YoY. So, I have 2 tables, for example one with CY 2022 by month (Jan'22, Feb'22 and etc.) and another one CY 2021 (Jan'21, Feb'21 and etc.) they ...
amitchandak
Super User
4 years agoIsgandar_B , Both tables can join with a common date table and and you can get current year from one and last year from second
example
current = SUM(Sales[Sales Amount])
past
Year behind Sales = CALCULATE(SUM(Sales1[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales1[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
- Isgandar_B4 years agoFrequent Visitor
Hi amitchandak,
Thanks for quick reply, but as i understand so i need another table with dates like calendar to can link them over date, because in one file month only from 2021 and in another one it is only 2022