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: 
beck_bakytbek
Master
Master

Aggr () in KPI

Hi Folks, i got a question, my table does lool like (see screenshot):

beck_bakytbek_0-1615840279415.png

i want to show the sum: 69.999.75€ in KPI, and i am using the following expression: i stored the expression in variable:

vCurrinEur: sum(aggr(sum([document currency]),accountnr))

within my KPI i am using this expression: $(CurrinEur) / [currency rate] - but it does not work

i changed the expression to:  sum(aggr(sum([document currency]),accountnr))/ [currency rate] but it does not work.

Does anybody have any idea, how to solve this issue?

Thanks a lot

Bek

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Based on the table you shared, you should be able to just use a basic sum... if the underlying data structure is different, could you please share that? Generally speaking without being able to see the data structure, I would expect that the [currency rate] aspects needs to be contained within the sum() in order to work correctly, since each row would presumably have its own currency rate.

View solution in original post

4 Replies
Or
MVP
MVP

Perhaps I'm missing something here - why do you need to aggr()? Why not just sum([document currency]/[currency rate])?

beck_bakytbek
Master
Master
Author

Or thanks a lot for your reply,

the case is, i merged the currency rate to maintable, then on the base of accountnr i calculated the sum, but if i try to show the sum in kpi, then my expression does not work. of cource my table is very large.

Or
MVP
MVP

Based on the table you shared, you should be able to just use a basic sum... if the underlying data structure is different, could you please share that? Generally speaking without being able to see the data structure, I would expect that the [currency rate] aspects needs to be contained within the sum() in order to work correctly, since each row would presumably have its own currency rate.

beck_bakytbek
Master
Master
Author

Thanks a lot for your feedback