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!
In my data base, I have data of 2019, 2020, 2021. They are weekly sales data. Right now, i am going to benchmark the sales of 2021 to the sales of 2019. In excel , it is simple, I will just use sales_2021/Average(sales_2019) to get index, and then i can pull a beautiful trend line of the indexed weekly sales. The attached pic below is an example of how I would do in excel. The Average() fucntion is the average of sales in 2019.
This is how i would do in excel
But Right now, I want do do it in Powerbi,
Here is the view of it:
I did 2 filtering here, one is teh category "Computers", and then it is the "Consumer Electronics" within it. The Sales is the Sum of sales of the week.
So my goal now is to create in index column, and plot it like what i do in Excel.
Would anyone please help?
@yts61
I'm assuming by what you wrote the granularity is by week and that you have a dates dimension that I called it 'Calendar' that has the week column in it for you to use as the x axis in your chart and then you basically need to choose only 2021 in the slicer and create this measure:
Index =
VAR _average_2019 = CALCULATE(AVERAGE('Table'[Sales]), 'Calendar'[Year] = 2019)
VAR _sales = CALCULATE(SUM('Table'[Sales]))
VAR _result =
DIVIDE(_sales, _average_2019)
RETURN
_result
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |