Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
have 2 tabels
the key is same Key:
(Itemnumber) in the 2 tabels
1 tabel has based on key 1 wich tells me product is either K (ilo) of U(nits) format
other tabel has same key, so based on that key should be possible
to see eiher K or U type product
then in same tabel the Qty value:
if K-type in field Grams
or if U-type value in field Pieces
then cost per K or U is always the same in field Price
so need some way by to get sum off
if K-type ( Grams x cost)
or if U-type ( Pieces x cost)
How to set this script In qlikview?
if vba I would set
If UnitType = "K" then 'in table 1)
Total = Grams * Cost
else
Total = Pieces * Cost
end if
You can use below expression in UI. Same you can use it in script but for that you need to join the table and use below on resident load. If all columns are in same table then you can directly use below in that table load.
Pick(match(UnitType,'K','U'), Grams * Cost, Pieces * Cost)
You can use below expression in UI. Same you can use it in script but for that you need to join the table and use below on resident load. If all columns are in same table then you can directly use below in that table load.
Pick(match(UnitType,'K','U'), Grams * Cost, Pieces * Cost)
great! thanks. this sample i can use in lots of other situations