Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
twanqlik
Creator
Creator

Aggr function in a Pivot table/Data Island

I've a question about the following 2 expressions:

In 1 expression i'm using an AGGR function including the [Year Month]  dimension, in the other expression not. 

I noticed in the output that the Unique Open (the one without the [Year Month] dimension is 0 for '2018 Mar'.

There is a record for '2018 Mar', but it has the same Campaign_Asset_ID.KEY as in '2017 Nov'.  In 2017 Nov the value is 1, which matches with the records.

My question. Because i'm using an AGGR function the [ Year Month] dimension in the table, is not used in the AGGR calculation. For that I need to add the [Year Month] in the AGGR function itself. What i did in the 'Unique Open - [Year Month]  expression. 

I hoped that by adding Dimensions in a table, it would have the same effect as adding dimensions in the AGGR function. But it's not. 

Now i'm wondering how i can use this AGGR function in a Pivot table, or in a 'Data Island' table. Because i need to be sure that the selected Dimensions are included in the AGGR function.

What is the best practice? 🙂 

 

Forum.png

Ideally, i would like to use the 'Unique Open' expression, with the same result as 'Unique Open - [ Year Month], so i can easily re-use the expression. 

 

1 Reply
sunny_talwar

Aggr function creates an independent virtual table using the dimensions specified in it regardless of the dimensions listed in your chart. In order to avoid grain mismatch, you need to include at least the dimensions specified in the chart and use it in the aggr() function unless it has a more granular dimension in aggr. 

Read about the Pitfalls of the Aggr function here.