Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Hierarchie Issue !!!

Hi Folks,

Attached is my sample application.

Script:

PlantCategories:

LOAD Plant,

     [Plant Code],

     LeadPlant,

     Region1,

     [Product Groups]

FROM

(ooxml, embedded labels, table is Sheet1);

tmp_PlantHierarchie:

Hierarchy([Plant Code],LeadPlant, Plant, [ParentName]   )

Load

     [Plant Code],

   LeadPlant,

     Plant 

resident PlantCategories;

PlantHierarchie:

Left join (PlantCategories) load

     [Plant Code],

     Plant1 as LeadPlantName

resident tmp_PlantHierarchie;

drop table tmp_PlantHierarchie;

Problem :

Not sure why I'm not getting right value in "LeadPlantName" filed

It should work like below based on Plant Code and LeadPlant entries:

Please help!

Thanks,
AS

9 Replies
amit_saini
Master III
Master III
Author

Any suggestions???

Thanks,
AS

MK_QSL
MVP
MVP

Try

PlantCategories:

LOAD Plant,

     [Plant Code],

     LeadPlant,

     Region1,

     [Product Groups]

FROM

[Book12.xlsx]

(ooxml, embedded labels, table is Sheet1);

tmp_PlantHierarchie:

Hierarchy([Plant Code],LeadPlant, Plant)

Load

  [Plant Code],

   LeadPlant,

     Plant 

resident PlantCategories;

Drop Table PlantCategories;

Anonymous
Not applicable

Hi,

Try using

PlantHierarchie:

Left join (PlantCategories) load

  [Plant Code],

    Plant as LeadPlantName

resident tmp_PlantHierarchie;

Instead of :

PlantHierarchie:

Left join (PlantCategories) load

     [Plant Code],

     Plant1 as LeadPlantName

resident tmp_PlantHierarchie;

Since Plant1 does not exist in table tmp_PlantHierarchie.

amit_saini
Master III
Master III
Author

Thanks Filip!

amit_saini
Master III
Master III
Author

Filip,

"Plant as LeadPlantName" this is giving me entries , but not the correct one.

It should be like below:

For example : Against "50016 Zaragoza, Spain" I should get output as "KT Barcelona" in LeadPlantName , because see below Lead Plant code is 11

Thanks,

AS

vikramv
Creator III
Creator III

Please check the attched ,Is it the same that you are looking for ...

punitpopli
Specialist
Specialist

Hi amit.saini‌,

The below link might help you :

Hierarchy in QlikView

amit_saini
Master III
Master III
Author

Sorry,

I'm looking for attached output:

Thanks,

AS

vikramv
Creator III
Creator III

Can you check this....It should work for you..