Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm trying to compute the price of an object made up of small pieces and I would like to know what happens to the total price if I replace some of those small objects.
Imagine I've got this situation:
Big object | Quantity | Price | Will be replaced by | Header 5 | Header 5 |
---|---|---|---|---|---|
Small object 1 | 5 | price 1 | Small object 1 | 5 | price 1 |
Small object 2 | 4 | price 2 | Small object 6 | 4 | price 6 |
Small object 3 | 6 | price 3 | Small object 3 | 6 | price 3 |
Small object 4 | 1 | price 4 | Small object 7 | 1 | price 7 |
Small object 5 | 2 | price 5 | Small object 5 | 2 | price 5 |
So the big object is still the same, but I changed two components (component 2 with component 6 and component 4 with component 7). Their prices could be smaller or bigger than those of the old objects and as I compute the price of the big object as the sum of the prices of the small objects, the total price changes.
The problem is that every small object has a quantity and I would like to select which small object will be replaced and which small object will substitute them. How can I tell to QS that object 6 will take the place of object 2 and object 7 will take the place of object 4? I tried with olny one object and the quantities were the same and I had no problem, but I need to have every object linked to its quantity to compute the total price.
I try to explain myself better: I have an engine made up of different objects (screws, injectors, ...). Every object has a price and a quantity and the price of the engine is given by the sum of the product of the quantities of the small objects by their prices.
What I would like to have is check what would happen to my engine if I change piece A with piece B. The quantity is still the same, but obviously their price is different. Now, if I change only one object at a time I have no problem, but if I try to select more objects Qlik Sense doesn't know which object will be replaced and which one will replace it, I mean, if I select object 2 and object 4 to be replaced by object 6 and object 7, QS doesn't know which is the order. So I thought using a table would be the best solution, but I still not solved the issues.
What do you suggest me? How can I link the piece that will be replaced with the piece that will replace it?
Thanks in advance for your help
Best regards
Nicolò Cogno
Can you please attach your Qvf file to work with?
It would be much easier
Hi,
I'm sorry but I can't
I could explain things better if it's useful
I am not entirely sure how your data is structured. You have two tables with the same information? I guess what we all are wondering is how the data is structured and once we know that, we need to understand the numerical output you are looking to get and in what object.
I'm sorry, here you see two tables because at the beginning I didn't know how to solve the problem. I figured out that having everything inside the same table was the best choice and so now I just want to see in the same table one line for each piece that will be replaced and also the piece that will replace the old one.
I hope I explained myself
Can you mock up the data which resembles your actual data to show how things look? I mean are there flags to depict old vs new?
Old objects and new objects are in different tables, what I want to do is to keep the quantities of the old objects, but replace their prices with the prices of the new objects to see what happens to the price of the big object
omarbensalem and stalwar1 I hope now the problem is more clear and thanks in advance for your help!!