The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Proud to be a Super User! | |
If I understand correctly, you can create a table of averages
Proud to be a Super User! | |
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:
Proud to be a Super User! | |
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:
@Anonymous 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!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
73 | |
52 | |
50 |
User | Count |
---|---|
132 | |
124 | |
78 | |
64 | |
61 |