Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sacosta5
Contributor III
Contributor III

Create 2 levels of grouping

Hi, I  have the following information, and I nedd to create two levels of grouping:

1) level (NIVECODIGO)

2) dependence of the delegation father (DELE_NUM_PADRE)

Niveles.jpg

The result to be obtained is the next in a pivot table:

Niveles2.jpg

Anyone have any suggestions?

THANK YOU!

4 Replies
swuehl
MVP
MVP

You may want to look into the HIERARCHY LOAD prefix:

Unbalanced, n-level hierarchies

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey Silvia Acosta,

Add something like this in your script:

     If(NIVECODIGO = 1, DELE_NOM, null()) as Nivel1,

     If(NIVECODIGO = 2, DELE_NOM, null()) as Nivel2,

     If(NIVECODIGO = 3, DELE_NOM, null()) as Nivel3


And then construct a table like your result


Thanks,

MB

sacosta5
Contributor III
Contributor III
Author

Hi Miguel,

Thanks for your suggestion, but it does not solve the second level of grouping. Also I need to use DELE_NUM_PADRE.

Silvia,

sacosta5
Contributor III
Contributor III
Author

Thanks Swuehl...

Thanks for your suggestion, I´ll take a look.

Silvia