Please don't clutter this site with duplicate discussions: Nested loop
If you don't have enough patience to wait 7 minutes for an answer you should hire a paid consultant. You can demand a timely answer for a price then. And probably learn some patience as well.
I don't see the attachment you mentioned. But look up the Hierarchy script function. See for example this blog post (also applies to Qlik Sense): Unbalanced, n-level hierarchies