Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
salto
Specialist II
Specialist II

Chart not multiplying correctly

Hello,

I am suffering this issue for a couple of days and I am really stuck on this...

I am trying to obtain a chart that shows the return orders in a period of time, per customer. In our ERP, the return order line has the product code and quantity.

Through the product code in the return order line, I can get the COST for the product in the Product table (so I should be able to obtain the overall product cost, per customer, etc...)

I can see the product cost in a tablebox, and the information shown on it is correct. The script seems to be correct.

Now, I need to group that information per customer, so I am using a chart. The chart uses the customer name as a dimension, and two expressions:

1.- SUM of QUANTITY (this works fine)

2.- SUM of the (QUANTITY* COST) - this is not working as it should

This is where my problem appears: if I do not select a single customer, some lines do not show the COST, so the (QUANTITY* COST) value is 0. But the QUANTITY value is correct.

Then, if I select a single customer, Qlik retrieves the correct product COST and then the (QUANTITY* COST) value is correct.

The weird thing is that it happens only for some records, and I am not able to see the difference between them. They all are appearing in the chart, so the SetAnalysis expression is correct for them.

The return orders are filtered per date in the SetAnalysis and they appear in the chart: if I select a single retrun order, both fields are correct. When no return order is selected, the return order information (the Quantity) is correct, but we are not always retrieving correctly the COST field in the Product table.

Why does it change when I select the customer - and when I de-select it?

Has anyone faced this problem before? Any help will be appreciated.

Regards.

5 Replies
boorgura
Specialist
Specialist

Is it possible for you to post a sample version of your application??

salto
Specialist II
Specialist II
Author

Hello,

of course, there it goes.

To see the "strange behaviour", select only May 2010. Make no selection in the Customers. Have a look at the Customer named Fdemel in the "Per client" chart. The quantity is 1 and the Standard Cost is 0.

Now, select the Fdemel client. The standard cost field now varies to the correct value (you can check the tablebox and see the value as well).

I am sure there is an explanation for this, but cannot figure it.

Many thanks in advance.

Anonymous
Not applicable

Salto,

I do not download files so can't see your application, but here is an advice:
Create three listboxes - Customer, Quantity, and Cost. Select Fdemel. I think you'll see what's going on. Possibly threre is no any Cost associated with Fdemel in May 2010, or there could me multiple values.

salto
Specialist II
Specialist II
Author

Thank you Michael,

but still no luck.

I have created those listboxes and checked Fdemel. Three different costs appear, but only one is taken into account in the chart. This is correct. But it is only taken into account when only the client Fdemel is selected. If no client is selected, the chart shows 0 in the cost.

But I have other client with 17 units of an item with the same cost. The same issue is happening with it.

Regards.

salto
Specialist II
Specialist II
Author

Hello,

thanks, I have tried with your suggestion. But I am afraid that the option of having multiple values for the standard cost in an item is not possible, because I am retrieving that unique value from the item table.

I'll keep on searching...