Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Use of Aggr in expression

Hello All,

I could use some help with this. It is my understanding that by using Aggr, I can summarize data from my data model in any way I like

and pull it into a chart expression. In the attached example, that is what I am trying to do.

If you look at the Test Fact Chart, It is driven by the dimensions and the Loan Month. I want to incorporate the data from Aggr simulation into this chart. The problem is, that the aggr data is summarized by Payment Month. I want a summary of all payments made where the Payment Month is equal to the Loan Month in the chart.

So, The aggr brings back the totals by 3 dimensions:

Dim1,Dim2,Payment month

Test Fact Chart is:

Dim1,Dim2,Loan Month

I believe that I must somehow rename the 'Payment Month' dimension to 'Loan Month' when it is returned from aggr so that the dimensions in the Test Fact Chart will be respected, is that true ? If I can't somehow rename, Is there another way to accomplish what I want to do ?

Thanks for any help.

Tim

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

=sum(total Aggr(If(LoanMonth=PaymentMonth,Amt,0),Dim1,Dim2,LoanMonth,PaymentMonth))

View solution in original post

2 Replies
Anonymous
Not applicable
Author

=sum(total Aggr(If(LoanMonth=PaymentMonth,Amt,0),Dim1,Dim2,LoanMonth,PaymentMonth))

Anonymous
Not applicable
Author

That solution is courtesy of Phil Bishop, thanks Phil!