Forum Discussion
DAX Weekly YOY
- 6 years ago
Newbie_2020 , Split year and week .
year = left([Year_Week ],4)
Week = right([Year_Week ],2)
better move week year to a new new table and create these columns there. Join on week year with the original table
example
YTD Week = CALCULATE(sum('Table'[Quotes]), FILTER(ALL('Date'),'Date'[Week]<=max('Date'[Week]) && 'Date'[Year]= max('Date'[Year])))
LYD Week = CALCULATE(sum('Table'[Quotes]), FILTER(ALL('Date'),'Date'[Week ]=max('Date'[Week]) && 'Date'[Year]= max('Date'[Year])-1 ))'Date' is new table you have week year
very similar approach
Power BI — WTD Questions— Time Intelligence 4–5
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
Newbie_2020 , Split year and week .
year = left([Year_Week ],4)
Week = right([Year_Week ],2)
better move week year to a new new table and create these columns there. Join on week year with the original table
example
YTD Week = CALCULATE(sum('Table'[Quotes]), FILTER(ALL('Date'),'Date'[Week]<=max('Date'[Week]) && 'Date'[Year]= max('Date'[Year])))
LYD Week = CALCULATE(sum('Table'[Quotes]), FILTER(ALL('Date'),'Date'[Week ]=max('Date'[Week]) && 'Date'[Year]= max('Date'[Year])-1 ))
'Date' is new table you have week year
very similar approach
Power BI — WTD Questions— Time Intelligence 4–5
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
amitchandak Thank you so much! Let me go ahead and try this. I really, really appreciate it. 🙂