Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Summing up sub-levels in List box TreeView

I formed a hierarcy using List box TreeView. I want all sub-levels to be summed up (like a pivot table does.) So for 'small' under 'Abrand' I need to see 55. And same for all above and below.  sum(cost) doesnt work!


LOAD * Inline [
Product, cost
Abrand-smdll-salty, 19
Abrand-small-salty, 23
Abrand-small-sweet, 22
Abrand-large-sweet, 12
Bbrand-smdll-salty, 33
Bbrand-small-salty, 23
Bbrand-small-sweet, 43
Bbrand-large-sweet, 65

]
;

treeview_sum.PNG

1 Reply
Anonymous
Not applicable
Author

I became convined that this is not possible using Listbox TreeView.  here is my logic:  its not possible to differenciate between hierarchy levels in expression ( treeView actually doesn't build a hierarchy - its  only seperaying text based on delimiters.)

hierarchy() function and pivot tables solved my problem.