Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum with conditions

Hi!

I have a problem with sum in pivot table.

I have a condition to convert all other currency in USD.

Here is my expression:

IF([Currency of Agreement]='UAH', Bench*Sum([Base Salary, Gross]/vUSDrate),if([Currency of Agreement]='PLN', Bench*Sum([Base Salary, Gross]/vPLNrate),Bench*sum([Base Salary, Gross])))

It doesnt sum properly, anyone can point out my mistake here?

1 Solution

Accepted Solutions
Not applicable
Author

I solved the problem with: IF([Currency of Agreement]='UAH', Sum([Base Salary, Gross]/vUSDrate *Bench),if([Currency of Agreement]='PLN', Sum([Base Salary, Gross]/vPLNrate*Bench),Sum([Base Salary, Gross]*(Bench))))

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Try this

IF([Currency of Agreement]='UAH', (Bench*Sum([Base Salary, Gross]))/vUSDrate,if([Currency of Agreement]='PLN', (Bench*Sum([Base Salary, Gross]))/vPLNrate,Bench*sum([Base Salary, Gross])))

Not applicable
Author

No, it doesnt sum properly,the numbers are too huge

Anonymous
Not applicable
Author

Can you share your qvw and the expected output?

Not applicable
Author

I solved the problem with: IF([Currency of Agreement]='UAH', Sum([Base Salary, Gross]/vUSDrate *Bench),if([Currency of Agreement]='PLN', Sum([Base Salary, Gross]/vPLNrate*Bench),Sum([Base Salary, Gross]*(Bench))))