Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Karahs
Partner - Creator
Partner - Creator

How to create hierarchy?

Hi Community,

My query is how can i create hierarchy  from the below data , as i have different rows with years,months and quarter. I need to make a drill down of year , month and quarter in a graph.

Any suggestion on how to create it into separate dimensions drill down?

Capture52.PNG

Thanks !

8 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

How many years do you have?

Besides 1980??

Karahs
Partner - Creator
Partner - Creator
Author

1980-2017

OmarBenSalem
Partner - Champion II
Partner - Champion II

You have 28 Excel table with that format??

OmarBenSalem
Partner - Champion II
Partner - Champion II

can you attach the 1980 , 1981 and 1982 excel files?

So that I can see how implement a generic way to transform all of your tables into the desired format and be thus able to create your hierarchy?

Karahs
Partner - Creator
Partner - Creator
Author

All year months and quarter are in rows

OmarBenSalem
Partner - Champion II
Partner - Champion II

How so? Can you screen shot your data source with 2 years?

I'm trying to help; you're not facilitating it

martinpohl
Partner - Master
Partner - Master

Here is the script:

Temp:

crosstable (MonthYear,Value,2) load

*

from your data;

Data:

load

"Commodity Name",

Commodity Code",

subfield(MonthYear,'M',1) as Year,                    //seperate Year

subfield(MonthYear,'M',2) as Month,                    // seperate Month

'Q' & ceil(subfield(MonthYear,'M',2)/3) as Quarter,               //create Quarter

Value

resident Temp

where MonthYear like '*M*';

drop table Temp;

Maybe add other timefields you need.

Regards

Karahs
Partner - Creator
Partner - Creator
Author

I have attached the document.