Hi there,
I'm trying to create a kind rolling average over the last 3 weeks but without using time intelligent functions.
My excel looks like this:
A | B | C | D | E | F | G | |
1 | WEEK 1 | WEEK 2 | WEEK 3 | WEEK 4 | WEEK 5 | WEEK 6 | |
2 | Observation / Total Items | 10% | 15% | 5% | 2% | 8% | 10% |
3 | Last 3 Week average | 10% | 7% | 5% | 7% |
And the excel formula from D3 woud be =AVERAGE(B2:D2), E3 =AVERAGE(C2:E2), F3=AVERAGE(D2:F2), and G3=AVERAGE(E2:G2)
What would be the best way to do it in Power Bi?
My objetive is to use a "Line and clustered column chart" where my week is on X-Axis, my total Items as a Column y-axis and my Observations/Items as a Line y-axis
Just in case my data looks like this:
Table 1 | |
Date | Week |
1/1/2021 | 1 |
4/1/2021 | 1 |
7/1/2021 | 1 |
10/1/2021 | 2 |
13/1/2021 | 2 |
16/1/2021 | 2 |
19/1/2021 | 3 |
22/1/2021 | 3 |
(My tables are already related by date column)
Table 2 | ||
Date | Items | Observations |
1/1/2021 | 72 | 66 |
4/1/2021 | 99 | 37 |
7/1/2021 | 89 | 18 |
10/1/2021 | 81 | 30 |
13/1/2021 | 84 | 12 |
16/1/2021 | 70 | 30 |
19/1/2021 | 77 | 6 |
22/1/2021 | 84 | 76 |
by the way, I'm using radom data just to give an example of what the data looks like.
Any suggestion would be greate...
Solved! Go to Solution.
If I understand correctly, you can create a table of averages
If I understand correctly, you can create a table of averages
It's pretty close.
What I really need is the chart that I mention before more than the summarize table, so I modify your formula a little bit, and looks like this:
It looks like you put the Calculos in the wrong table.
Try,
Make a new table with:
You are right...
Thanks for the help. I'm really glad
@parry2k thanks for answering.
What I'm looking for is a DAX for the step 2.
Stept 1: Formula where I can calculate average of my observations over Items by week from my table 2 (Which I already have).
Stept 2: Then I need to calculate the average from the 3 last weeks for each week (Like the first excel table example).
I already have the next formula:
@mzunino001 your question is not very clear, what do you mean by without time intelligence function also you want to use the last 3 weeks (what do you think week means here, is this not related to time? )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
222 | |
57 | |
48 | |
44 | |
43 |
User | Count |
---|---|
289 | |
209 | |
79 | |
75 | |
66 |