Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Grandmother, Mother and daughter

Hi all,
In a table I have the following dataset:

GrandmotherMotherDaughter
123456234
123456345
123789678
123789567

What I want is:
- When I select a Grandmother in a list box, I want to see the Sales of the Grandmother, Mothers and her Daughters
- When I select a Mother in a list box, I want to see the Sales of the Mother an her Daughters
- When I select a Daughter in a list box, I want to see the Sales of the Daughter.
In a early discussion I thought I had the answer by the following result (see table below). Only the result below is not working for me, because when I select a Daugter I also see the Sales of the Mother and the Grandmother.

GrandmotherMotherDaughterLink field
123456234234
123456345345
123789678678
123789567567
123456456
123789789
123123

Is using Hierarchy the solution? Help!!!!!
Best regards,
Arjan

9 Replies
sujeetsingh
Master III
Master III

Arjan,

Your table needs to be chabged with the structure it looks.

See the sample it may help you.

Anonymous
Not applicable
Author

Hello Tiger,
Thanks for your respons!
I want to make selections on numbers (grand mother, mother and daughter) in stead of expressions.
I need a link field as below, but not as the table below.
Now, when I select (for example) a daughter (234), then I see in the link field also the Mother(456) and Grandmother (123).  First, when selecting a Grandmother I want to see only the data (linkfield) of the grandmother.
GrandmotherMotherDaughterLink field
123456234234
123456345345
123789678678
123789567567
123456456
123789789
123123
Using Hierarchy or Hierarchy belongs to?
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this code.

DATA:
Load * inline [
GM,M,C
123,456,234
123,456,345
123,789,678
123,789,567
];

Hierarchy_Data:
Load Distinct GM as Ch Resident DATA;

Concatenate

Load Distinct GM as P,M as Ch Resident DATA;

Concatenate

Load Distinct M as P, C as Ch Resident DATA;

Hierarchy(Child,Parent,Child_Name)
Load Ch as Child,
  P as Parent,
  Ch as Child_Name
Resident Hierarchy_Data; 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Hi Kaushik,
Thanks for your respons!
How does the code above look in combination with this fact_table:
GM, M, C Sales €
123120.000
456100.000
789  75.000
234  50.000
345120.000
678  95.000
567    5.000

Is it in a treeview possible to select only 123 to see only the sales of 123?

I hope you can help!

Arjan

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     One the Hierarchy is created link that with the field Called Child to the filed from your Fact Table.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Ok,

In an other dashboard I used the following script,

////////////////////////////////////////////

LOAD * INLINE [

ID,           ParentID,                Name                                                  

123,          ,                         Relatie123

456,          123,                    Relatie456

789,          123,                    Relatie789

234,          456,                    Relatie234

345,          456,                    Relatie345

567,          789,                    Relatie567

678,          789,                    Relatie678



]
;



Treeview_tmp2:                          

Hierarchy(ID, ParentID, Name,,Name,TreeView) Load

ID,

ParentID,

Name

Resident Treeview_tmp1;



drop table Treeview_tmp1;

///////////

How can I get the data below in the structure of ID and Parend ID?

GrandmotherMotherDaughterLink field
123456234234
123456345345
123789678678
123789567567
123456456
123789789
123123

Regards,

Arjan

Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

Thanks for your respons!

Where I'm looking for is to get the tree data in a structure of ID and parentID.

Hope you can help!

Not applicable
Author

Hey Gysbert..

please refer the following post and help

http://community.qlik.com/message/368257#368257