Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Rsaiq
Creator
Creator

Above Function inside aggregation

Hi All,

I am getting issue in the expression for aggregate with above function.

Error Message :- Above Function is not allowed inside aggregation.

Rsaiq_0-1626262852203.png

My Expression is 

=Xirr( if(Account='13405',RangeSum(Above(Total Account1,0,RowNo(Total))), RangeSum(Above(Total Account1,0,RowNo(Total)))), Date)

Has someone an idea how to get this fixed.

Thanks

 

 

Labels (5)
1 Reply
hic
Former Employee
Former Employee

I am not sure I understand what you are trying to achieve, but here are some thoughts:

First, take a look at https://community.qlik.com/t5/Qlik-Design-Blog/Aggregations-and-Function-Classes/ba-p/1462653. It explains some of the things around which function you can use where.

Secondly, the Above() function refers to the previous dimensional value. What do you have as dimension? Is it "Account1"? If so, you don't need to specify this inside the Above() function. It automatically looks at the chart dimension. But you do need so specify *what* number to fetch from the previous dimensional value. E.g. Sum(Payments).

I don't understand why you need RangeSum(Above(...)). The Xirr() function should take care of the accumulation by itself. However, but if you do need it, you need to have something like
    RangeSum(Above(Sum(Payments),...))
in order for it to make sense.

That means that you now have one aggregation function "Sum(Payments)" inside another aggregation function "Xirr(...)". This is not possible, unless you use an Aggr() function between the two, like
    Xirr( Aggr( Sum(Payments), <Dimension>, Date ), Date)

HIC