Qlik have introduced the Cyclic group to Qlik Sense Cloud, Which is a fantastic addition for you to dynamically change the dimension based on the cyclic group.. This opens the doors to dynamically use the the Cyclic group in Aggregation function in a calculation.
- Create a Cyclic group with the required Dimension values . EG Locations.
- Create a Variable in the script to get the label of the group dimension created above (Note the single quotes and the = inside , very important for the $ expand to compute the values from the cyclic field name selected
set vLocations = '=GroupDimensionLabel(Locations)';
- Use the variable inside your formula
Aggr(Rank(1-count({<[somefield]={'somevalue'}>}some_number)/count(some_number)),$(vLocations))