Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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
Highlighted

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.

Highlighted
Creator II
Creator II

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

Highlighted
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;

Highlighted
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

Highlighted
Creator II
Creator II

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

Highlighted
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]