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: 
alexsid-qlik
Contributor II
Contributor II

Set Analysis Pricing

Dear Community,

I am struggling with my calculation. What I have is a list of Options and their respective price. Also I know how many of them were sold. So I want to cumulate this Sales.

I tried this approach : Sum({$<[Price] -= '0'>} [Price]*Quantity)

But it doesn't work properly! I attached an excel as an example.

I would be happy for your help.

Regards, Alex

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({$<[Price] -= {'0'}>} [Price]*Quantity)

View solution in original post

9 Replies
sunny_talwar

Try this

Sum({$<[Price] -= {'0'}>} [Price]*Quantity)
Anil_Babu_Samineni

Try this as well, Make sure whether you have applied correct field

Sum(If(Price <> '0', Price*Quantity))

Or

Sum({<Price = {"=Sum(Price)<>0"}>} Price*Quantity)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
alexsid-qlik
Contributor II
Contributor II
Author

Thank you @sunny_talwar and @Anil_Babu_Samineni!

Both solutions work excellent for me.

alexsid-qlik
Contributor II
Contributor II
Author

Hi,

the number seemed a little bit too high actually.

So I exported my table to Excel. And when I sum up there I get a much lower number. How can that be? 

Would be thankful for help.

sunny_talwar

Would you be able to share a sample to show the issue?
alexsid-qlik
Contributor II
Contributor II
Author

I cant share my initial data because it is sensitive. And when I simplify the data it works. So there must me something wrong in my data. I am sure the formula works right.
sunny_talwar


@alexsid-qlik wrote:
I cant share my initial data because it is sensitive. And when I simplify the data it works. So there must me something wrong in my data. I am sure the formula works right.

In that case, I am not really sure how to help you... I mean I need to see something before I can see what might be going on.

alexsid-qlik
Contributor II
Contributor II
Author

ok i found my mistake. I had a wrong Where statement in my load script.
sunny_talwar

Great 🙂