I would imagine its possible to do everything you require.
If you were to share some data and more detailed requirements on this forum then either myself or someone else would assist in the more technical aspects.
With the calculating off of 2 pivot tables I don't think this will be possible in the same manner, however Qliksense has some advanced aggregation and calculation functions that would probably be able to calculate in a singular table.
With regards to the groupings, this is fairly straightforward, there are a couple of options...
You could either use the 'Class' function where Qliksense does the groupings for you based on the criteria you set or you could load an inline table within the data model to set these groupings.