Skip to main content
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

AGGR() by All Dimensions in a Table

Hey all,

I want to automatically aggr() by every dimension that is in my table. Is there a way to concat all the dimensions together potentially using Dimensionality() and GetObjectField(). 

For example, if my table had PRODUCT and CUSTOMER as dimensions, the aggr would end up looking like:




Labels (1)
2 Replies

AFAIK the measure is automatically calculated against all the dimension in a straight table, trying to understand your need, are you changing your dimensions through some variable or filter? I normally see needs to skip few chart dimensions or utilize aggr to have dimensions other than chart dimensions.

Contributor III
Contributor III

That was what I thought it should be doing as well. I'll show the example. The aggregation function I'm using is actually an IRR() with an ordered aggr() by months to ensure my cashflows are correctly sorted. I have two dimensions in my straight table for this example. I have 3 different measures.

The first contains the correct answer and aggrs() by the two dimensions in the table + months:


The middle measure is what I was hoping would work, it is just an aggr by the sorted months:


The last measure has nodistinct in it but just repeats the middle calculation for every row:



The underlying data is fairly simple. It's a single table in the data model that is distinct on the combination of ID_NUMBER and MONTHS. There are no nulls or any other oddities.