Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi folks,
I want to calculate Year on Year % change as per the below table. I want the YoY change to be calculated at the product level.
How can I achieve this ? Thanks in advance.
Year | Product | Total Sales |
2018 | Car | 200 |
2019 | Car | 345 |
2020 | Car | 64 |
2021 | Car | 654 |
2022 | Car | 456 |
2018 | Bike | 125 |
2019 | Bike | 560 |
2020 | Bike | 230 |
2021 | Bike | 238 |
2022 | Bike | 100 |
Year | Car Sales | YoY % Change | Bike Sales | YoY % Change |
2018 | 200 | 125 | ||
2019 | 345 | 560 | ||
2020 | 64 | 230 | ||
2021 | 654 | 238 | ||
2022 | 456 | 100 |
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
To calculate the Year on Year (YoY) percentage change for each product, you'd typically calculate the difference in sales between the current year and the previous year, then divide by the sales of the previous year.
YoY % Change =
VAR CurrentYearSales = TableName[Total Sales]
VAR PrevYearSales = CALCULATE(
SUM(TableName[Total Sales]),
FILTER(
TableName,
TableName[Product] = EARLIER(TableName[Product]) && TableName[Year] = EARLIER(TableName[Year]) - 1
)
)
RETURN
IF(
ISBLANK(PrevYearSales) || PrevYearSales = 0,
BLANK(),
(CurrentYearSales - PrevYearSales) / PrevYearSales
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
82 | |
47 | |
42 | |
33 |
User | Count |
---|---|
186 | |
80 | |
72 | |
48 | |
45 |