Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm using a long expression to calculate the price of complex objects made up of smaller objects (engines are big objects made up of medium objects such as injectors and these are made up of small objcets such as screws):
Sum(Aggr(Sum(small_objects.TOTAL_QUANTITY]*[medium_objects.TOTAL_QUANTITY])*Min(small_objects_cost), small_objects, big_objects))
In my dashboard if I select a small_object I can see the engines that contain this object and with the expression above I can calculate the price of every engine. My problem is that if I select a small object (let us assume it's a screw) I can't see the total engine price anymore, but I just see the price of the small object multiplied by its quantity (this is beacuse every small object has a price, a quantity and the medium objects it belongs to) and so this is my question:
how could I have the sum of the prices of the engines that contains the screw, but without having only the screw selected in the engine (I mean the price calculated as I didn't select only that particular small object)? Now, as I said before, I have a engine with its price, but when I select a small object I only get the price of this object instead of the total price of the engine as before.
So the ideal process would be: the selection of a small object gives me the engine the small object belongs to and then I would like to have the price of each engine calculated with the price of ALL the small objects, not only the one selected.
I thought using {$<small_object=>} was the solution, but this doesn't work and I suppose this is beacuse of the aggregation
Thanks in advance for your help and your attention
Best regards
Nicolò Cogno
I won't know unless you provide more details or share a sample
Since you have a Sum() which include the multiplication. Technically, it should apply to both
Sum({<small_objects, Engine = p(Engine)>}small_objects.TOTAL_QUANTITY]*[medium_objects.TOTAL_QUANTITY])
You're right
Would adding {<small_objects, Engine = p(Engine), Medium_objects = p(Medium_objects)>} change anything?
Because I also need the selection doesn't edit the medium_objects set
I would not use p(Medium_objects)
{<small_objects, Engine = p(Engine), Medium_objects>}
Nothing changed
I have no idea my friend
I'm Sorry!!! I had another active selection!!!!!!!!!!!! Your reply was perfect!!!!!!
Thanks a lot, you always solve everything!!