Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
sadasiva
Contributor 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

Tags (2)
6 Replies

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

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.

sadasiva
Contributor II

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

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
New Contributor III

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

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
Valued Contributor

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

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

sadasiva
Contributor II

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

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
New Contributor III

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

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]

Community Browser