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: 
Not applicable

set analysis (sum, avg, aggregation...)

Hi all,

I have a list of orders like the following :

Order IDAmountCurrencyCurrency RateOrder Date

I need to show, in a text box, the sum of all Amount in Euro where :

sum of all Amount in Euro =sum of all orders and for every Order: sum(Amount) * the average of Currency Rate of the current Currency.

that means, the average of Currency is calculated based on all other order having the same currency

any idea ?

Regards,

Yacine

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try this


Sum(Aggr(sum(Amount) * Avg(CurrencyRate), OrderNo))


Let me know

Not applicable
Author

thank you but this not works

in your expression, Avg(CurrencyRate) is equal to CurrencyRate

Not applicable
Author

I think we should add some conditions to Avg(CurrencyRate)

alexandros17
Partner - Champion III
Partner - Champion III

could you post your document?

PrashantSangle

Hi,

did you try with TOTAL Keyword,

Like this,

Avg(TOTAL CurrencyRate)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

attached an example of data

Not applicable
Author

doesn't work

alexandros17
Partner - Champion III
Partner - Champion III

Here it is my example, let me know

Not applicable
Author

thank you but this is not what I want. for this example, we should have 1 currency rate for CHF and 1 currency rate for BRL (for all the data). then, we have to divide every order amount by the currency rate