# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for
Did you mean:
Master

## Aggr () in KPI

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

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)
• ### Aggr () in KPI

1 Solution

Accepted Solutions
Master

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.

4 Replies
Master

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

Master
Author

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.

Master

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.

Master
Author

Thanks a lot for your feedback