Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
cr7dav
Contributor II
Contributor II

Bill of materials: how to obtain a summary BOM with hierarchy

Hi all,

 

In Qlik Sense script I have a simple table with only three column: ParentCode, Code and Quantity.

 

I'd like to specific a particular code and obtain a list of all sub-codes with proper quantity, obviously not only at the first level.

I suppose to use the Hierarchy function but I don't know how to setup it and organize the script.

 

Can you help me? 

Thanks in advance

Davide 

Labels (1)
2 Replies
OmarBenSalem

Can you please a sample data? maybe 5 or 10 mock data? That would help

cr7dav
Contributor II
Contributor II
Author

Thanks for reply! 

 

Something like this 

ParentCode    Code    Qty

SCH77             CAD77      2

SCH77             ITG11      10

CAD77              ITG11       5

CAD77              ITG9          2

 

So if I choose ParentCode=SCH77 in a where clause, I'd like to obtain

CAD77    2

ITG11      20

ITG9         4

Thanks again