Тёмный

Power Query Running Totals - The Right Way! 

MyOnlineTrainingHub
Подписаться 656 тыс.
Просмотров 76 тыс.
50% 1

There are a few ways to create a running total in Power Query, but most of them are slow. In this video I'm going to show you the slow way, and the right way, that's super fast to calculate. Download the Excel file here: www.myonlinetr...
The final query shown in the video is called "Multi-Col Table Buffered ListGenerate".
View my comprehensive courses: www.myonlinetr...
Connect with me on LinkedIn: / myndatreacy

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 180   
@drsteele4749
@drsteele4749 3 года назад
Wow. That's all really impressive. I comprehended only parts of it, so I will download the file for future use because I would have no chance of ever re-creating it. My question is why doesn't MS just create a Running Total function and put it in the list of MCode functions and in the ribbon?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
I agree, a running total function would be super helpful!
@JakobBeer
@JakobBeer 4 месяца назад
Thank you very much for this video. Though I find it troubling that something as simple as a running total requires so much effort in PQ. In Python, it is simply cumsum() and you're done.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 4 месяца назад
While you can calculate a running total in Power Query, it isn't really designed to aggregate data. It's a data gathering and cleaning tool. Whereas PivotTables are where running totals are easy.
@marksmith1721
@marksmith1721 3 года назад
Hi, Great Video - very helpful. I have an expanded request based on this. When we have the running total I need a column that shows the max of the previous 5 days totals, and that again is a running total, so everyday show me the max of the previous 5 days rolling total. This is for PNL and so the rolling total goes up and down on a daily basis. In a normal spreadsheet that is easy, but in Power Query in Excel I can’t get the logic. It should be close ish to what you have done here? Any idea anyone on the formular/setup I need to achieve that?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hi Mark, please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@KamranMumtazAhmed
@KamranMumtazAhmed 4 месяца назад
Cannot we wrap up the source with List.Buffer and then apply the List.FristN and List.Sum? List.Sum(List.FirstN(List.Buffer(Source[Amount],[Index]))) something like this?
@tmb8807
@tmb8807 3 месяца назад
If you put that after the 'each' keyword in the Table.AddColumn function then it will likely be even slower, because for every row in the table it will do the whole operation, including re-buffering the list.
@edsta714
@edsta714 3 года назад
You lost me right at the end but I love it. Thank you. Would you be able to do a video where the RT restarts with one or multiple criteria’s?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hopefully when you download the file you can inspect it yourself and understand it better. Not sure what you mean by 'where the RT restarts with one or multiple criteria'...isn't that what this is doing i.e. restarting at each group? Perhaps you can post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@ricos1497
@ricos1497 3 года назад
@@MyOnlineTrainingHub Mynda, I think edsta714 is referring to a running total "at each change of XXX". I understand your method completely and how to apply it to grouping, but I'm guessing edsta714 is trying to understand how this would work (or could be made to work) if you had two columns in your data rather than just a value column. To achieve this: Area Value RT East 123 123 East 123 246 East 100 346 West 123 123 West 100 223 etc. I think that's the question anyway!
@Bd0921
@Bd0921 2 года назад
@myonlinetraininghub Hi Mynda, I'm have a similar thought as Rico Illustrated... can this be used to create a "running sub-total" if we have multiple sub groups in a data set?
@thegrilow
@thegrilow 2 года назад
gREAT!!! Supossed we have another column dividing the Value column..... How can I do this exact path but with categorical group?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Not sure what you mean. Please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@eitancohen
@eitancohen Год назад
Hi, great video, I'll probably have to watch it 100 times, hopefully something will catch on in the end.... What if I want to make a running total for 2 or 3 columns? I messed up...
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
Glad you liked it, Eitan! Please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@wayneedmondson1065
@wayneedmondson1065 3 года назад
Hi Mynda. Thanks for the advanced lesson on running totals in Power Query. Always more to learn and practice :)) Thumbs up!!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Cheers, Wayne!
@Cookstein2
@Cookstein2 2 года назад
at ~11:08 you show that the query still executes 'instantly' after increasing the filtered row count from 5,000 to 100,000. My understanding was that the query doesn't actually execute until you load the data; and that's when you can compare performance. Everything you see in the PQ editor is being performed on a preview of the dataset. Am I wrong in this belief and actually the query is being performed on the whole dataset live in the PQ editor?
@tmb8807
@tmb8807 3 месяца назад
Hi Mynda. I know this is an old video but I've only just come across it in trying to find a good way to add any kind of window column to a table... great stuff! Thank you. The thought occurs - given there's no consideration for referencing an index column of the original table, could you use the List.FirstN function inside List.Generate, and reference the current iteration using _? Like: List.Generate( () => 1, each _
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 месяца назад
Good question. I don't know off the top of my head. I'd have to test it.
@tmb8807
@tmb8807 3 месяца назад
@@MyOnlineTrainingHub Tested it on a table with ~5m rows and it is noticeably slower (although still faster than using an index column). I guess using List.FirstN means every item in the list (except the last) would be evaluated more than once - the first item would get evaluated 5 million times... whereas your way evaluates each item only once. Thanks for showing how to do this! 👍
@lisaliu6954
@lisaliu6954 6 месяцев назад
Hi, I try to use the same formula, but it just keep saying "Added Indedx" wasnt recognised.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 6 месяцев назад
Please post your question and sample Excel file on our forum where someone can help you further: www.myonlinetraininghub.com/excel-forum
@IvanCortinas_ES
@IvanCortinas_ES 3 года назад
Excellent video Mynda. Thanks a lot for sharing your job.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
My pleasure, Ivan!
@robertmohammed1741
@robertmohammed1741 8 месяцев назад
Hi Mynda...what if I need to calculate RT on more than one "value" columns from one table?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 8 месяцев назад
Please post your question and sample Excel file on our forum where someone can help you further: www.myonlinetraininghub.com/excel-forum
@josephthibault6999
@josephthibault6999 Год назад
I like using power query over dax a lot becuase while it makes the updating and adding data take longer it makes the dashboard faster for the users.
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
If you need the running total in the source data it makes sense to use Power Query 👍
@josephthibault6999
@josephthibault6999 Год назад
@@MyOnlineTrainingHub I also do a lot of comparing to last period and I find it easier to use two index columns and merge the table to itself and use calculated columns to do the math in power query.
@mokka61
@mokka61 Год назад
Thanks 🙏 , but if we need to be like sumifs Accumulated balance depends on multiple criteria
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
Please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@AprendaWell
@AprendaWell 3 года назад
Amazing!!! I comprehended only parts of it, so I'll download the file for future use and learn too. Thanks for sharing
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Great to hear!
@walterstevens8676
@walterstevens8676 7 месяцев назад
Really interesting thanks. I have a different problem: I need to check the sum of each employee's working hours per month, against a monthly contracted number of hours. So I require a running total (and monthly reset) of a dynamic number of employees. This is because I'm doing "point in time" analysis, not just looking at monthly aggregates. I'm dimly aware that this might require use of a date (calendar) file, in order to "move along". Do you cover that sort of thing anywhere, or could you point me in a direction?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 7 месяцев назад
I'd probably just use a PivotTable running total via the right click > show values as > running total in > 'days'. If you get stuck, post your question and sample Excel file on our forum where someone can help you further: www.myonlinetraininghub.com/excel-forum
@walterstevens8676
@walterstevens8676 7 месяцев назад
@MyOnlineTrainingHub thanks I'll try that and join your forum!
@mshparber
@mshparber 3 года назад
Excellent, thank you! One question, though: at 4:48 you are saying "[Index] list...". Why "list"? why isn't it just the value in the [Index] column of the current row?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hi Michael, a column in a table is technically called a list. So when I'm referring to the Index list it's the same as saying the Index column. Hope that clarifies things. I can see it can be confusing when terms appear to be mixed.
@gabrieluxux
@gabrieluxux 2 года назад
Great though there is hardly only one category in the data, so let's say there is a 'product' category and its sales per day, how do you reset the count for each product category or each date category (weeks or months)?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
I'd probably use a PivotTable, but if you must use Power Query, see this tutorial on grouped running totals: www.myonlinetraininghub.com/grouped-running-totals-in-power-query
@iankr
@iankr 3 года назад
Gosh - that's very advanced. But I don't know anything about that programming language you were using. What is that language? Is it part of Power Query? I think I got lost along the way somewhere. Many thanks.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hi Ian, Power Query uses the M language specific to Power Query.
@iankr
@iankr 3 года назад
@@MyOnlineTrainingHub Thanks, Mynda.
@hbokam
@hbokam Год назад
Hello Mynda, thank you so much for your videos, I had learn so much from your video in the past couple of years! I do have a question for you on this running total, I used this method in one of my Power BI, and it had been working great, however, my analysis is getting more complex and I had to run the running total function over 5 times within the same query, and right now my query takes over an hour to load. I am wondering if I have to clear the buffer before I use the same rolling total function again? Thank you.
@pxxgxx1949
@pxxgxx1949 3 года назад
Thanks Mynda & Phil for the code - great content as usual
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Our pleasure!
@contabilidad_del_futuro
@contabilidad_del_futuro 2 года назад
how do you do if you want to sum january to december and then a new year start again cumulative?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
I'd do this in a PivotTable.
@DanBrill
@DanBrill 2 года назад
Really great. It's complex but you made it easy to follow. Thanks so much!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Glad you liked it!
@AnhLe-c8s
@AnhLe-c8s Месяц назад
It is a good practice! how to do running total with 2 or 3 conditions. It is the same function SUMIFS in excel. Thanks a lot!
@MyOnlineTrainingHub
@MyOnlineTrainingHub Месяц назад
I'd use a PivotTable for this.
@AnhLe-c8s
@AnhLe-c8s Месяц назад
@@MyOnlineTrainingHub Thanks, do you have youtube link to present how to use PivotTable for that?
@MyOnlineTrainingHub
@MyOnlineTrainingHub Месяц назад
This tutorial explains how: www.myonlinetraininghub.com/excel-pivottable-show-values-as
@williamstan1780
@williamstan1780 3 года назад
Hi Mynda Tks for the info. I encounter issue with power query I wanna set auto refresh on both pivot table and power query The data used in the pivot table is the output of power query. After i set an VBA workbook.refreshall on the source data sheet, and disable the background refresh, everytime I open the worksheet, it just continously non stop refreshing the workbook which I forced me to end the application. I wonder if I did anything wrong? Thanks in advance
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Probably :-) please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@alvaromdp
@alvaromdp 6 месяцев назад
Wow!... Optimization is really the key to achieve this... and you explain exactly how to do it!.. Thank you so much!!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 6 месяцев назад
Glad it was helpful! 🙏😊
@imadkhaja
@imadkhaja 2 года назад
Hi .. great tip... I initially used DAX for running total in a Power BI visual but due to huge data size, matrix visual was taking a long time to refresh whenever a filter is applied. So I thought to perform the calculation within Power Query to speed-up the report visual. I was able to create the column with running totals in Power Query, however, I have two additional columns; product and month. I need Jan-Dec running totals for each product. Is it possible using this method?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Please see this tutorial: www.myonlinetraininghub.com/grouped-running-totals-in-power-query
@DoersGen
@DoersGen Год назад
Loved it, thank you so much
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
So glad!
@cristoferhillmerrios5976
@cristoferhillmerrios5976 2 года назад
Hi, Thank you for the video, it is amazing! I tried to used on query after merging and for some reason does not work, do we need some extra lines in the code?
@williamarthur4801
@williamarthur4801 2 года назад
If you nest the 'buffer' within LIst.FirstN will it work the same? so ; List.FirstN( List.Buffer(#"Added Index"[Units] ) ,[Index] ) ) , rather than, List.FirstN ( Bufferlist,[Index] ) ) , I can't see any reason why there should be a performacne issue, but i've been wrong before. 🙄🙄
@PhilipTreacy0
@PhilipTreacy0 2 года назад
Hi William, yes that will work the same.
@williamarthur4801
@williamarthur4801 2 года назад
@@PhilipTreacy0 Thanks for the response, I don't know if you've done similar to generate but with accumulate; so Table.AddColumn(#"Added Index", "RTC", each List.Accumulate(#"Added Index" [Unit] , {0} , (A, B)=> A & { List.Last(A) + B } ) { [Index] } ) Must admit tried diescting and getting down to whats going on such as why the seed needs ot be a list and still not sure. Might make a fun video, keep up the good work.
@nandansubramanya
@nandansubramanya Год назад
Thanks a lot for making such wonderful videos. I did not know about List.Generate!!! Could not resist thanking you
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
So nice of you 🙏
@georgepent7616
@georgepent7616 3 года назад
You' re nice and your presentation nicer??
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thank you! 😃
@arnienicdao6474
@arnienicdao6474 2 года назад
Great tutorial! How do you apply this if you have sub-categories?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Thanks, Arnie. See this tutorial for grouped data: www.myonlinetraininghub.com/numbering-grouped-data-power-query
@borisgrushin868
@borisgrushin868 3 года назад
Jeez, not sure I can say I'm an advanced excel user anymore. I'm quite behind the times on excel tools.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad you learned something new, Boris :-)
@rosivanbatista8900
@rosivanbatista8900 2 года назад
Excellent Very Good! Just what I needed... tks;👏
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Great to hear!
@jiky4296
@jiky4296 3 года назад
Omg this is too advanced and tough.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Yeah, some things require a bit more work than they should. If you need help you can post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@HarryBourneOnline
@HarryBourneOnline 3 года назад
Great to see this work, but I can't help wondering why you wouldn't just load the data into a pivot table and add a running total column that way, which is significantly easier and doesn't have any of the speed or memory issues you talked about early on in the video. Maybe I'm missing something - please explain! Thank you.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hi Harry, I agree, PivotTables is the right place for running totals, but sometimes people want them in Power Query as they are later used in other calculations in Power Query before loading the data.
@allabout1135
@allabout1135 3 года назад
Thanks, valuable video. After watching this video, I got an question. Is it possible to calculate cumulative percentage in power query?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad you liked this video! You can calculate cumulative percentage in the same way. If you get stuck, please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@khersheonteoh5697
@khersheonteoh5697 3 года назад
My brain is full of carbon dioxide now
@manojlakhotia697
@manojlakhotia697 3 года назад
Hi Mynda, Thank you so much for the video. It's super useful :) Small help required ! I tried to calculate the running total based on the same logic explained. I was able to make my way through all the steps but on the RT step it returns me a NULL value for all rows. Not sure why ! *Just a note here - I have total three columns. Any thoughts ?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad it was helpful, Manoj! As for the running total issue, please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@elturkocharro4106
@elturkocharro4106 3 года назад
Super!! Pretty advance but this is a great way to get into this problem when millions of records have to be calculated. I'm working on using this technique on the scenario of having different products which need to get a running total for each one! Thanks a lot!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
So pleased it was helpful :-)
@pum4041
@pum4041 2 года назад
Thank you very much for your clear explanation. It helps me optimization of the current calculation. You are the best!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Great to hear!
@mariaelver
@mariaelver 2 года назад
Thank you for this video, just solved my problem! And by adding several indexes, I can now run different slicers on running totals according to the users perspective on sorting😄
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Fantastic!
@kbg6240
@kbg6240 3 года назад
I get cyclic reference error
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Must be something different in the way you've written your query.
@Laurentmahe
@Laurentmahe 3 года назад
Hi Mynda. Thanks for this excellent tutorial. One issue I have since today (might have been from the weekend), my List.Buffer function now returns my list in a different order than the original column. This was working for the past month. I can't understand why it's failing now. Has something changed on Power BI? (it's in a dataflow in case that helps)
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
That's odd, Laurent! I suspect it's at the dataflow level and List.Buffer is just buffering the list as it receives it.
@Laurentmahe
@Laurentmahe 3 года назад
Thanks @@MyOnlineTrainingHub not sure how or why, I then experienced the exact same issue with Power BI Desktop. In the end what fixed it for me was to Table.Buffer() before trying to List.Buffer(). In case it helps others...
@GeertDelmulle
@GeertDelmulle 3 года назад
Finally got round to wrapping my head around List.Generate. Powerful stuff and very versatile. I agree: this is a linear effort formula for calculating a CumSum. This has to be the most efficient way... And that List.Buffer trick makes a huge difference, too. This is a great lesson!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad it was helpful, Geert!
@silverfunnel6819
@silverfunnel6819 3 года назад
This is "running totals" Deluxe:-) Thank you!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
You're welcome!
@aleksanderstrommer7677
@aleksanderstrommer7677 3 года назад
How to reset running total every year if data is year - monthly based?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Here's a tutorial on grouped running totals: www.myonlinetraininghub.com/grouped-running-totals-in-power-query
@darrylmorgan
@darrylmorgan 3 года назад
Hi Mynda!Great Explanation Of The M CODE... Thank You And Thank You Phil :)
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Cheers, Darryl!
@DK_85
@DK_85 3 года назад
Dear Mynda, great explanation. Thank you. I have the tricky challenge to reverse a monthly running total (ytd values) to monthly values...if you have a nice solution in PQ you would help me so much:) Kind regards
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Dennis! We actually had a question like this recently on our forum and Phil wrote a custom function for it. Please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@10ozGold
@10ozGold 2 года назад
List.Generate is genius! Thank-you so much Mynda and Philip.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Glad you like it!
@zakincc
@zakincc 3 года назад
You are awesome 😎
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad you liked my video 😊
@dimasagil90
@dimasagil90 Год назад
Really advanced and really need to understand the syntax. Thanks for sharing
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
Glad it was helpful!
@hello201014
@hello201014 2 года назад
You're a lifesaver Mynda. Thank you so much!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
You're most welcome, Pratik!
@gordonmuldrew1570
@gordonmuldrew1570 3 года назад
Thanks works brilliantly. For my data I want to have another running total in the same table based of another column but still linked by Country. E.g add a column = Value2 and have a RT for Value2 alongside the RT for Value. How do I fit that into the code?
@gordonmuldrew1570
@gordonmuldrew1570 3 года назад
Actually figured that out, was relatively easy.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Great to hear!
@charlpotgieter24
@charlpotgieter24 2 года назад
Hi Mynda & Phil, Thanks for the excellent article & video - performance is surprisingly good. On some days my brain does struggle with the way Power Query utilises the each keyword and underscore conventions in functions like List.Generate. Below is my much more verbose version which I find a little easier to understand in case it is of interest to anyone.. (Values as list)=> let BufferedValues = List.Buffer(Values), fn_Seed = () =>[Counter=0, RunningTotal=BufferedValues{0}], fn_ContinueWhileTrue = (CurrentRecord)=> CurrentRecord[Counter] let NextRecord = [ Counter = CurrentRecord[Counter] + 1, RunningTotal = CurrentRecord[RunningTotal] + BufferedValues{Counter} ] in NextRecord, fn_ReturnValue = (CurrentRecord)=>CurrentRecord[RunningTotal], Output = List.Generate( fn_Seed, fn_ContinueWhileTrue, fn_GenerateNextValue, fn_ReturnValue ) in Output
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Thanks for sharing, Charl!
@menschnars
@menschnars 2 года назад
I'm a seasoned Power Query User, but this is a lifesaver for current edge case! Thank you
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Great to hear!
@ahmadmaleki7525
@ahmadmaleki7525 3 года назад
hi thank you for knowlodge please show how create a trading plane dashboard like a pro ?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Ahmad! I don't know what 'trading plane' is, sorry.
@sunnygala7972
@sunnygala7972 Год назад
Thanks :)
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
Welcome!
@bravucod
@bravucod 3 года назад
What is the advantage of doing in power query instead of dax?. Great video BTW!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Daniel! If you want a rank that respects filter context then I'd use DAX. If you want the rank to remain unchanged, I'd use Power Query because it's typically more efficient for PQ to add calculated columns that it is to do this in PP.
@HarshitSharma-gc5jb
@HarshitSharma-gc5jb 3 года назад
Hi Ma'm. Can you please make a detailed video on Excel Header and Footers? It would be great if that includes using VB for creating dynamic headers and footers.
@HarshitSharma-gc5jb
@HarshitSharma-gc5jb 3 года назад
I have a specific query regarding above task. I want to put an image in the header. Image should be existing in a worksheet so that sending the Excel file through mails doesn't mess up the header image.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Please post your question and sample Excel file on our forum where we can help you further: www.myonlinetraininghub.com/excel-forum
@rcarranzamanuel
@rcarranzamanuel 2 года назад
What about by subgroups that long 5000 rows
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
Not sure what you’re referring to.
@rcarranzamanuel
@rcarranzamanuel 2 года назад
@@MyOnlineTrainingHub my data set has groups and subgroups such as Films, then action, horror etc how to do running totals for that kind of situation
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
I would do this in a PivotTable. Not sure why you'd want this in your raw data.
@jimfitch
@jimfitch 3 года назад
Marvelous! Thanks, Phil, for the technique (enjoyed the blogpost). Thank, Mynda, for the demonstration.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Cheers, Jim!
@jimfitch
@jimfitch 3 года назад
@@MyOnlineTrainingHub Cheers!
@HanifTutorial
@HanifTutorial 3 года назад
Good👍👍
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thank you!
@seamushand8439
@seamushand8439 Год назад
Thanks Mynda - that is really useful
@MyOnlineTrainingHub
@MyOnlineTrainingHub Год назад
Glad you think so!
@AccountingandQuickbooks
@AccountingandQuickbooks 3 года назад
Nice 👍
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thank you!
@abdulhaseeb8027
@abdulhaseeb8027 3 года назад
A bit too advanced for me but it was amazing nonetheless.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Abdul!
@TheMrMishutka
@TheMrMishutka 3 года назад
Great video and very useful. I think maybe @edsta714 means can you do running totals by category - ie by the value of another column (eg by product or geography or month). I realise you can do this in Pivot Table or DAX but if for some reason you want it in the Power Query step it would be useful
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Andrew! Re @edsta714's comment, you mean by nested groups. Yes, you could rank by nested groups by performing another grouping of the data before adding the index column.
@oViTaLZzHD
@oViTaLZzHD 3 года назад
@@MyOnlineTrainingHub Could you do a video on this? It would be really useful!
@enriquefernandezaraujo3943
@enriquefernandezaraujo3943 4 месяца назад
Thank You for the video, it is clear and straight to the point.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 4 месяца назад
Great to hear 🙏
@stefanlux3038
@stefanlux3038 3 месяца назад
Thanks a lot for this great video! In my case I have the topic to calculate the RT per shift. So my calculation has to start from new with the first number of the next shift. The shift itself ist listed in a separate column. Is there a way to do this?
@dgitson
@dgitson 3 года назад
Microsoft must hate their users to necessitate anything like this. They must want users to use Python or SAS. Excel already has a running total feature in their pivot tables. So, I'd think the logic would be have been made more accessible here.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
I think you nailed it...they expect you to perform running totals in PivotTabes, not in the source data, which is effectively what Power Query is designed to get. But us Excel users always want what we can't have :-)
@jimfitch
@jimfitch 3 года назад
So that’s why I want what I don’t have ... b/c I’m an Excel user!
@ricos1497
@ricos1497 3 года назад
I both agree and disagree. I think they are perhaps trying to separate the transformation and calculation layers here and steering people away from PQ for this type of thing. It makes sense from the perspective of building these applications, and 99/100 times you would probably be better served doing this. As Mynda mentions in another comment, you might want to perform the calculation for use elsewhere in the transformation piece. I'd like to see them move toward a unified experience between PQ and Power Pivot (like in power bi), which I think would help us visualise the cut off between transformation and creating measures. It's definitely a function I'll be copying for future use, thanks Mynda!
@jimfitch
@jimfitch 3 года назад
To Rico’s point: I had a huge aha! moment in my PQ, PP, DA growth when I realized that I was trying to do way too much in PQ. Part of that was learning: I wanted to see can be done in PQ, so I tried everything. But, because we can does not mean we should. Since aha!, I restrict PQ to ETL & generally avoid calculations, which I do in the workbook after load. From time to time, there’s an exception, but that’s my general rule. Life is better since then.
@makisalimhussain2334
@makisalimhussain2334 3 года назад
Great Mynda. Thank you 👍
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
My pleasure, Maki!
@jatindersingh2241
@jatindersingh2241 3 года назад
Wow, I got lost but sound amazing , have to watch again and again
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks, Jatinder! Please download the workbook and have a closer look at the examples.
@grahamparker7729
@grahamparker7729 3 года назад
Bit advanced for me but very good
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Cheers, Graham!
@Barry-nz6pe
@Barry-nz6pe 3 года назад
Wow, you lost me, but this was really great.
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Hopefully the Excel file will make it clearer.
@cujasa38
@cujasa38 3 года назад
It was a great explanation!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks so much, Andres!
@chrism9037
@chrism9037 3 года назад
Very impressive Mynda!
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Thanks so much, Chris!
@shabbirkanchwala-abwaab6263
@shabbirkanchwala-abwaab6263 3 года назад
Wow Time Saver Thanx
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad you liked it :-)
@yengyangnaotou9590
@yengyangnaotou9590 3 года назад
you are the best Mynda !
@MyOnlineTrainingHub
@MyOnlineTrainingHub 3 года назад
Glad you liked my video :-)
@fapfapfap26
@fapfapfap26 2 года назад
what is #"Added Index" ?
@MyOnlineTrainingHub
@MyOnlineTrainingHub 2 года назад
That is the name of a step. It's usually the previous step, but doesn't have to be.
@fapfapfap26
@fapfapfap26 2 года назад
@@MyOnlineTrainingHub thanks for the reply!
Далее
Fast Running Totals in Power Query (Complete Guide)
29:16
Create a Running Total by Category in Power Query
17:44
The Secret to List.Accumulate in Power Query
20:43
Просмотров 15 тыс.
List.Accumulate in Power Query with Practical Examples
27:26
The Excel Trick I Use EVERY DAY (and you should too!)
11:21
Power Query - Faster & Easier Parameters
13:38
Просмотров 38 тыс.
How to Calculate Running Totals in Power Query
11:51
Excel Formatting Tricks That Make You Look Like a Pro
12:15