Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
boryspower
Creator
Creator

Product structure

Hello,

I have a file with simple product structure (please look below) and I want to make an multi level structure from it.

Example of what I have:

item component quantity_in_item other_fields

xx1 yy1 1

xx2 xx3 1

xx2 yy2 2

yy1 zz1 1

yy1 oo2 3

yy2 yy1 2

yy2 oo1 1

The quantity says that for example that one piece of yy1 consists of one zz1 and three pieces of oo2... but I think it doesn't matter for this example...

and what I want to present is:

HI_level level-1 level-2 level-3

xx2 xx3

xx2 yy2 oo2

xx2 yy2 yy1 zz1

xx2 yy2 yy1 oo2

end so on....

So I'd like to get like tree structure from a "flat" file... is it possible? Any ideas how it could be solved?

Thank You for Your time in advance.

Borys Power

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

From the help text:

ParentName is a string used to name the new ParentName field. If omitted, this field will not be created.

As I read that, specifying anything there is telling it to create a NEW field with the given string as the name. Not sure why it doesn't require single quotes around the string for clarity, but QlikView often lets you not use them. Anyway, you're both loading a field ParentName, and asking QlikView to create a new field, ParentName. Thus the error.

View solution in original post

7 Replies
johnw
Champion III
Champion III

Have a look at hierarchy loads in the help text or reference manual. That's exactly what they do.

boryspower
Creator
Creator
Author

but as I understand You I have to have sone ParentItemName field?

johnw
Champion III
Champion III

The parent of "component" is "item". That's your parent child relationship unless I'm misunderstanding your data?

boryspower
Creator
Creator
Author

You are right, sorry 🙂

Thank You!

boryspower
Creator
Creator
Author

Hi again,

One more thing - when I try to run:

I get error:

What am I doing wrong??

johnw
Champion III
Champion III

From the help text:

ParentName is a string used to name the new ParentName field. If omitted, this field will not be created.

As I read that, specifying anything there is telling it to create a NEW field with the given string as the name. Not sure why it doesn't require single quotes around the string for clarity, but QlikView often lets you not use them. Anyway, you're both loading a field ParentName, and asking QlikView to create a new field, ParentName. Thus the error.

boryspower
Creator
Creator
Author

Hi,

It was a bit confusing but finally I understand it 🙂 Thank You!