Fast Running Totals in Power Query (Complete Guide)

Fast Running Totals in Power Query (Complete Guide)

BI Gorilla

1 год назад

27,412 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

German
German - 18.10.2023 02:10

Hey Rick! thank you so much for sharing this info, helped me a lot with a project I was stuck on for a few days. Kind regards!

Ответить
Robert Green
Robert Green - 28.09.2023 16:27

What a great video. I think this will really help time series calculations in my dashboards

Ответить
東天
東天 - 08.09.2023 20:24

Thank you for the clear explanation ! :)

Ответить
Chris Walter
Chris Walter - 04.09.2023 13:18

Great series of videos, I am currently trying to see if I can take some of these principles to improve my Grouped Rolling Total Values calculation speed. Rolling total is slightly different to the running total described in your video, as I am interested in previous 3,6,9,12 months etc. Currently I am using List.Sum with Greater Than and Less Than conditions, but with a couple thousand rows this takes very long time (1+hr to calculate). Could not find existing Power Query video on this topic, but if you have one, please point me in that direction.

Ответить
Ramiro Ayala
Ramiro Ayala - 26.08.2023 09:34

💯👍

Ответить
Kinda Khalaf
Kinda Khalaf - 18.08.2023 15:20

Does this work even if the columns I'm dealing with are calculated columns?

Ответить
Ross Williams
Ross Williams - 18.08.2023 00:23

Great videos. Keep ‘em’ coming 👍

Ответить
Kevin Rackliff
Kevin Rackliff - 19.07.2023 22:40

Great video Rick, very informative and easy to follow, even for a beginner like me, thanks

Ответить
Alex Kin
Alex Kin - 11.07.2023 15:07

Hi. Can you help me with the following. I want to to create a column that looks something like this. IF (Column name) >=20230601 but <=20230631 then 1 else 0. How can i create a column where something within a range should become 1 and all the rest should be 0. I have really tried andr tried without any luck, can you show me how?

Ответить
Abhishek Awari
Abhishek Awari - 02.07.2023 22:24

Hey can you please make a video on how to calculate running count via calculated column measure in powerbi

Ответить
Orlean Costa
Orlean Costa - 10.05.2023 03:01

Thank you very much for sharing it.

Ответить
Hemal Shah
Hemal Shah - 07.05.2023 17:34

Explanation is good, however, the need for simple lany. 😊

Ответить
Rodrigo Vásquez Bernal
Rodrigo Vásquez Bernal - 06.05.2023 05:23

Never thought that was a "buffered" function. I really like you "coding" solutions.
But I have a question... Why you didn't use calculate, then filter by allselected dates? does this use more resources on a larger scale?. I'm mean the "calculate" is way shorter and simpler.
Great video.

Ответить
Krista Reay
Krista Reay - 03.05.2023 05:50

I am doing a running total for inventory forecasting. Each location has a Max inventory allowed and Min inventory allowed. How can I do a Running Total for each category, where each category has its own Min/Max limit? For example, inventory cannot exceed 2200 and cannot be below 200 for location "A", whereas location "B" cannot exceed 500 and cannot be below 50. This Min/Max is listed in another column that can be referenced for each category/group. I have the running totals working for each group but cannot seem to figure out how to incorporate min/max limits. Can you help?

Ответить
Hussain Al-Shaikh
Hussain Al-Shaikh - 30.04.2023 05:13

Great explanation and guidance,
I have applied your step everything look great, but when I load the table to sheet the Running Total Column showing Blank with out any value where the value already existing in the query, can you please help my in this issue.
Manty Thanks

Ответить
Jan Bolhuis
Jan Bolhuis - 23.04.2023 10:10

I'm a beginner with PQ but was able to follow you well. Great and clear explanation. You have a fan :) thank you.

Ответить
Lucky Salomi
Lucky Salomi - 04.04.2023 20:10

Incredible video. I learned List.Generate recently. Didn't know I could iterate like I was writing a loop in python.
List.Generate is way more powerful than I thought.

Ответить
Jérome Astier
Jérome Astier - 24.02.2023 02:32

& i love the List.Buffer thing. Hats Off!

Ответить
Jérome Astier
Jérome Astier - 23.02.2023 22:40

Very Impressive!

Ответить
Ing. Félix Hernández B.
Ing. Félix Hernández B. - 19.02.2023 13:35

Espectacular esta lección de Power Query, gracias !!!

Ответить
Ranjith NK
Ranjith NK - 09.02.2023 06:03

Absolutely fantastic - Clear in thought, explanation, voice, demo & samples, Thanks a ton

Ответить
Anatuly Al Maimany
Anatuly Al Maimany - 19.01.2023 00:44

Thank you so much for creating this amazing Video on running total. #1 tutoring on running total.

Ответить
Scott Morrison
Scott Morrison - 18.12.2022 18:36

This is crazy. For years I've been duplicating queries, removing columns, doing GroupBy, and Sum, and then pulling the totals back to my original dataset with a merge. I've created so many unnecessary tables. This is a godsend for me. Thanks a million!

Ответить
Rui Oliveira
Rui Oliveira - 01.12.2022 02:59

Great great content! Congratulations

Ответить
bagnon
bagnon - 17.11.2022 09:04

Here is my take on this, using an index column to merge the two lists:

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Number", Int64.Type}}),
Number = #"Changed Type"[Number],
Custom1 = List.Generate(
()=> [RT = Number{0}, Counter = 0],
each [Counter] < List.Count(Number),
each [RT = [RT] + Number{[Counter]+1}, Counter = [Counter]+1],
each [RT]
),
#"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), {"Running Total"}, null, ExtraValues.Error),
#"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Number", each Number{[Index]}),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Number", "Running Total"})
in
#"Removed Other Columns"

Ответить
Matt
Matt - 15.11.2022 04:03

This all should be doable via gui. That's one thing missing in Power Query.

Ответить
manoj rajeev ram g
manoj rajeev ram g - 03.11.2022 07:10

Wonderful video Rick! I went over your blogs on PQ, Excellent content! Thank you very much for that effort and very simple explanation.

Ответить
anand jha
anand jha - 30.10.2022 06:22

This video was great cleared all my concepts.Can you share a video on consolidating files with changing column headers especially when there are many columns.

Ответить
Sumanth Sasidharan
Sumanth Sasidharan - 26.10.2022 21:48

Great content.. I recently switched to list.generare. And I do see performance improvement. But my next challenge in power query is to do FIFO tables, where for each material there is sales and purchases. Doable but very challenging. If you run out of content, please consider how to do FIFO using power query.

Ответить
SeneXeL
SeneXeL - 26.10.2022 21:41

What a great video!

Tons of valuable content!

Saved in the learning playlist!!

Ответить
Krzysiek Banach
Krzysiek Banach - 26.10.2022 21:18

Brilliant!!!

Ответить
John Rice
John Rice - 26.10.2022 20:31

That magic index column.🤔

Ответить
william Arthur
william Arthur - 26.10.2022 19:21

Really great video, I found Generate hard, and still haven't been able to get the data type to work,
I get the error " can't convert list to type", any chance of doing a bit more on the accer method, I've been using it for ages without really understanding it, this is a bit different to your method;

List.Accumulate( Source [ Unit], {0 } , (A, B )=> A & {List.Last(A) + B } )

I've not been able to isolate the ampersand to see what it's doing. Lastly and alternative to your ingenious method of joining Source to list , just add column with an Index as place holder . More curly brackets.

Ответить
Renier Wessels
Renier Wessels - 26.10.2022 18:25

This was excellent thanks Rick. I have learned so much from you so far already. Please keep on creating this excellent content!

Ответить
Geert Delmulle
Geert Delmulle - 26.10.2022 18:13

Thanks for pointing out that null-trap and how to avoid it. Great stuff! :-)

Ответить
Francisco M. Paredes Arias
Francisco M. Paredes Arias - 26.10.2022 16:51

Thank you for your time and solution to the problem that you expose. Greetings from Chile.

Ответить
Jose Maria Gomez Martinez
Jose Maria Gomez Martinez - 26.10.2022 16:48

Superb!, Thanks for sharing!

Ответить
Denis Sipchenko
Denis Sipchenko - 26.10.2022 16:40

Hi Rick!
Super usefull, thank you!

P.S. What about the cherry on top - code encapsulated into function like AddRunningSum(TableName, inColumnName, outColumnName)
?

Ответить
Hugh Laughland
Hugh Laughland - 26.10.2022 16:08

Hi Rick, this is a great way of doing it. I was just wondering if you have multiple products and want to see the running total per product, how would you calculate that? Can you group it dynamically?

Ответить
William Elliott
William Elliott - 26.10.2022 14:38

excellent video & well explained as always

Ответить