Forum Discussion
POWER_TESTING
Helper I
5 years agoYoY calculation based on Year
Hi Community, can you please help me, i need to calculate YoY based on Year - don't have proper date. please find the attachment
POWER_TESTING
Helper I
5 years agoI don't have Date table, how would I use dates ??
This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
below are my DAX exressions:
MAX_Year_1 = CALCULATE(SUM(Sheet1[Freight]),FILTER(Sheet1, Sheet1[Year]=MAX(Sheet1[Year]) ))
Previous_Year_1 = CALCULATE(SUM(Sheet1[Freight]),FILTER(Sheet1, Sheet1[Year]=MAX(Sheet1[Year])-1))
but these are working for by defauly, if i select year not working.....
v-lionel-msft
Community Support
5 years agoHi POWER_TESTING ,
Generally, you need to create a calendar table first.
Custom Year-Over-Year Calculation in DAX - SQLBI
Power BI - Year over Year (YOY) Reports using SAMEPERIODLASTYEAR - Carl de Souza
Solved: How to do YOY and QOQ calculation using DAX - Microsoft Power BI Community
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.