Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello Everyone,
I am trying to figure out how to calculate YOY. My issue is, in excel I create a pivot to summarize annual sales and on the worksheet I would calcuate the YOY using (Previous Sales - New Sales)/Previous Sales. However, since I can't edit the visual like I do in excel, I would perform this action in the query table. Below is a snap shot of the data in my table; I need to be able to do calculate YOY at the "Product" level; assuming this will filter down to the Item Name when I create the filters in my visual
| DOCDATE | ITEMNAME | LINE AMOUNT FC | Product |
| 2014-10-02 | Chicken 20/0.5 lb | $0.00 | Product A |
| 2015-02-11 | Chicken 20/0.5 lb | $0.00 | Product A |
| 2015-03-25 | Chicken 20/0.5 lb | $0.00 | Product A |
| 2016-03-07 | Chicken 20/0.5 lb | $0.00 | Product A |
| 2016-10-12 | Chicken 20/0.5 lb | $0.00 | Product A |
| 2014-01-03 | Chicken 4/6 lb | $393.20 | Product A |
| 2014-03-19 | Chicken 4/6 lb | $436.45 | Product A |
| 2014-10-02 | Chicken 4/6 lb | $436.45 | Product A |
| 2015-02-11 | Chicken 4/6 lb | $898.80 | Product A |
| 2015-06-25 | Chicken 4/6 lb | $560.18 | Product A |
| 2015-08-24 | Chicken 4/6 lb | $590.93 | Product A |
| 2015-11-06 | Chicken 4/6 lb | $597.24 | Product A |
| 2015-12-31 | Chicken 4/6 lb | $0.00 | Product A |
| 2015-12-31 | Chicken 4/6 lb | $0.00 | Product A |
| 2015-12-31 | Chicken 4/6 lb | $627.82 | Product A |
| 2015-12-31 | Chicken 4/6 lb | $627.82 | Product A |
| 2016-03-07 | Chicken 4/6 lb | $1,209.92 | Product A |
| 2016-05-13 | Chicken 4/6 lb | $583.26 | Product A |
| 2016-07-26 | Chicken 4/6 lb | $599.92 | Product A |
| 2016-10-12 | Chicken 4/6 lb | $600.56 | Product A |
| 2014-01-03 | Chicken 3/12 lb | $862.08 | Product A |
| 2014-10-02 | Chicken 3/12 lb | $478.45 | Product A |
| 2014-12-03 | Chicken 3/12 lb | $472.08 | Product A |
| 2015-02-11 | Chicken 3/12 lb | $472.08 | Product A |
| 2015-03-25 | Chicken 3/12 lb | $472.08 | Product A |
| 2015-06-25 | Chicken 3/12 lb | $588.45 | Product A |
| 2015-08-24 | Chicken 3/12 lb | $620.75 | Product A |
| 2015-11-06 | Chicken 3/12 lb | $614.40 | Product A |
| 2015-12-31 | Chicken 3/12 lb | $0.00 | Product A |
| 2015-12-31 | Chicken 3/12 lb | $0.00 | Product A |
Solved! Go to Solution.
Hi @JamilESpencer,
Please add a calendar Table to your model if you don<t have one and link it to your table by date (DOCDATE).
Then create your measure as you want for example ( I called my table Data):
Sales = CALCULATE(SUM(Data[LINE AMOUNT FC])) Sales LY = CALCULATE([Sales],PREVIOUSYEAR('Calendar'[Date]))
and you can perform any measures you want.
Let us know if you have any issues.
Ninter
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |