Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi guys
I have this table created by transformation->grouping + merging fields from other table
I need to create aditional column with rolling 3 month calculation in POWER QUERY by adding Custom Column
example : For Jan 2022 (Jan 22+Dec21+Nov21)/3 =(6.44+9.18+6.45)/3=7.36
For Dec 2021 (Dec21+Nov21+Oct21)/3 =(9.18+6.45+2.07)/3=5.9
This table name : PREMIUM WORKFLOW( 1)
Can anyone pls help ?
Solved! Go to Solution.
Hi @gany ,
Please have a try.
(x)=>
List.Average(Table.SelectRows(#"Renamed Columns", (row)=>List.Contains(List.MaxN(List.Select(#"Renamed Columns"[Period], (y)=>y<=x[Period]),3), row[Period]))[Value])
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gany ,
Please have a try.
(x)=>
List.Average(Table.SelectRows(#"Renamed Columns", (row)=>List.Contains(List.MaxN(List.Select(#"Renamed Columns"[Period], (y)=>y<=x[Period]),3), row[Period]))[Value])
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Amazing, thanks a lot
@gany I see, I don't have a handy solution for that and I'm not sure if I'm going to spend time to make it happen. I hope someone else can help. Good luck!
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.
Ok, thanks anyway
@gany not sure what to say. What have you tried? Are you getting errors or wrong results? Can you share more details?
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.
I'm trying to add this as a custom column withing power query .
I got it working as a measure but that is not what i need, i need to expand table by aditional column (in power query)
@gany there are so many articles on it, here is link to one Rolling 12 Months Average in DAX - SQLBI
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) 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!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
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.
Thanks for the reply...i saw that one ...still dont understand the logic and was not able to use it.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |