Forum Discussion
My queries are running so slowly!
Hi Anonymous ,
yes, that makes sense now: Your running total needs to go through the whole table and has to store each step in there. As you are trying to create a grouped/clustered running total, it would be much better if you would group your table on [CaseNo] and apply the running total function on the resulting partitions. I've described that procedure here:
Memory efficient clustered running total in Power BI – The BIccountant
If your data isn't sorted by CaseNo already, you must omitt the change to "GroupKind.Local".
Thanks for that!
OK, i think I understand what this is doing. I've put this into the function fxSecRunningTotal and now adjusting the made bit of code.
Additional question though, I need to do this for three different fields. At the moment I have the same function three times, but with different names (the running totals are calculated in different queries, of which I've shared the code for just one). Am I right in thinking I can remove the other two functions, and just use this new one?