7 Replies Latest reply: Mar 1, 2017 4:20 AM by Nicolò Cogno RSS

    Replace components one by one

    Nicolò Cogno

      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 objectQuantityPriceWill be replaced byHeader 5Header 5
      Small object 15price 1Small object 15price 1

      Small object 2

      4price 2Small object 64price 6
      Small object 36price 3Small object 36price 3
      Small object 41price 4Small object 71price 7
      Small object 52price 5Small object 52price 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