Discussion Board for collaboration related to Creating Analytics for QlikView.
I have a table like that :
items : "id_item,id_item_from,item_value"
where :- id_item is the item identifiant- id_item_from represent the id_item of another item (it can be 0 if this item is not linked with an other item)- item_value is the item value ^^I need to traverse items which have not a null id_item_from and then :
sums the "item_value" of the items which have an "id_item" who is in the list of "id_item_from"
example :id_item,id_item_from,item_value1,0,52,0,63,1,94,2,3I should have=> id_item : 3 which have id_item_from = 1 => get the value : 5=> id_item : 4 which have pour id_item_from = 2 => get the value : 6Result : 5+6 = 11 I tried this :
It's wrong because "$(=id_item_from)" is the "current" selection ... not the corresponding "id_item_from" of the current traversing "id_item" ...
Any solution ?
Thanks in advance.
Is it OK to handle it in the script? You could join the table back to itself like this:
[Example]:LOAD * INLINE [id_item,id_item_from,item_value1,0,52,0,63,1,94,2,3];LEFT JOIN LOAD id_item as id_item_from,item_value as item_value_fromRESIDENT [Example];