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: 
Anonymous
Not applicable

Is there any way to pull hierarchy data in database to qliksense

Hi Team,

I am looking to load Navision data to Qliksense.  In DB tables all the hierarchy fields(Upto 5 levels) are coming in single column. How can i achieve this?

Regards,

Sadasiva

6 Replies
Anonymous
Not applicable
Author

Hard to give a definitive answer without seeing a sample of your data. 

But this thread Hierarchies by Henric has helped me unravel hierarchies on more than one occasion.

Anonymous
Not applicable
Author

Hi Bill,

Hierarchy level wise bifercation is happening through numbers.

Lets say from 1000-9999 will be level-1 from 1100 to 1400 will be level 2, 1110 to 1115 will be level 3 and so on.

How can manage this data in qliksense?

any thoughts?

Regards,

Sadasiva

sth_wch004
Contributor III
Contributor III

select

case when range between  0 and 1000 then 'Level 1'

         when range between  1001 and 2000 then 'Level 2'

         when range > 2000 then 'Level 3'

end as "Hierarchy

from

table;

tomasz_tru
Specialist
Specialist

As long as You have correct key connecting child and parent, you don't have to worry about numer range.

Loading hierarchy data ‒ Qlik Sense

Anonymous
Not applicable
Author

Hi Chris,

Will the case statement work in qlik, i am not sure. Can you caonfirm this once, because when am using the same not working.

Regards,

Sadasiva

sth_wch004
Contributor III
Contributor III

Hi Sadasiva,

Do you connect to Microsoft SQL?

SQL: -

     case when `parent_category_id` between  0 and 10 then 'Level 1'

              when `parent_category_id` between  11 and 20 then 'Level 2'

              when `parent_category_id` > 20 then 'Level 3'

     end as "Hierarchy ",

I am using mysql as example.

1.JPG

Excel: -

     if (field< 1000, 'Level 1',

     if (field < 2000, 'Level 2',

     if (field > 3000, 'Level 3'

     )))  AS [Hierarchy]