Subtotal sorting

Steven Talbot · Friday Demos · December 6, 2024 · 3:18

Some nice custom sorting additions to subtotaling to order differentially inside hierarchies.

Try it yourselfThe full week on docsdashboardsworkbook

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. I can go Al was that an advent of code tab you had in your browser it was nice ask solving it all in Excel very literally I try to go as far as I can every year in Excel oh today might be the breaking point that's amazing okay um this is actually just a rehash but it's hopefully better demo this on Monday as a from hack week the sub tootal sorting but it really only worked in one case and everything else is broken now uh it's richer feature and hopefully Works although I still haven't written any tests um so anyway there basically like we have this uh like you can sort the one I demoed on Monday is you can sort basically complete sort by

  2. subtotals so or across all the subtotals and the individual rows so here thoring descending by count so so the the subtotals are sort of descending the states within are sort of descending and within the states the cities are sort of descending uh flip it sort of descending um and the um but you can also it works with pivot hopefully once I broke it oops is that working click it again but yeah so it works with pivots sort of s um and then you can also now really risking it doing it with pivots on but I think I made it all work rather than sorting total like completely over everything if you want to say sort one of the buckets by the measure but then sort

  3. a subtotal by something else like say I want I don't care about the states sorted alphabetically but I do care about the countries or I want I want the states store it alphabetically but I want the countries buy them the account can do this hopefully it doesn't explode yeah so there we go so now and it defaulted all subtitles must be sorted so it actually did it for me um it's now sorted by country descending on this it might actually be easier get to it um I think there's an interesting issue when you toggle yeah yeah yeah uh so sorted by country descending but then the states are sorted alphabetically so I think it all works uh need to write about a 100 tests because

  4. there are all these cases about like pivots non pivots all the way you can sort and remove sorts from the query and they have to work and keep sub stable but hopefully it's a next week kind of thing