Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
Can you help me with this:
I have a table showing price for kg, and I need to find the right price for the total weight.
| min_kg | max_kg | price |
| 0 | 45 | 2,99 |
| 45 | 300 | 1,1 |
| 300 | 500 | 1,04 |
| 500 | 999999999999 | 0,99 |
i tried this formula, and it gives me nothing:
=sum({$<min_kg ={"<$TOTAL_WEIGHT"},max_kg=
{">=$TOTAL_WEIGHT"}>} price)
and this formula gives me the total for all the prices, but not one single line
sum({<TOTAL_WEIGHT= {">$(min_kg)<=$(max_kg)"}>
} price)
Hi,
You have to remove the Dimensions min_kg, Max_kg else it will display the price all the weights.
Regards,
Chandra
Hi thanks.
But I need to find the right price. The TOTAL_WEIGHT is in a different table and there is no link between them. If customer A buys 350 kg he should pay 1,04 for the kg, but if he buys 25 kg he should pay 2,99 for each kg.
You can't solve this with set analysis expressions since those are calculated once per chart and not per row. You can probably solve this in the load script using the intervalmatch function to match TOTAL_WEIGHT with the interval defined by min_kg and max_kg. That way you can match the correct price to the TOTAL_WEIGHT. Attached is an example that demonstrates the intervalmatch function.
i thik it rt why this one i dont no
Thanks, I will solve it in the load script
Try set intersection
=sum({$<min_kg ={"<$TOTAL_WEIGHT"}*{">=$TOTAL_WEIGHT"}>} price)