Note that there recently were discussions about the performance costs of a preceding load being to high, so test with your data to ensure the costs are not too high.
You may also be able to replace the aggregating mapping tables and additional resident loads with the ApplyMap() functions with loading your fact table two times, once sorted asc, once des, to create the entries for the first and last line of your grouping entities.
Thanks Stefan. I should search for an experiment I did a few years back, when the use of ad-hoc fields always made the GROUP BY fail. I gave up since then. Remember discussing the state of QlikView documentation? This is what it says in the help article on the LOAD statement: