Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

adnan_rafiq
Contributor II

2 header rows , cross table and mapping

Hi All,

I am having problem loading data out of an qvd that is made out of an excel(top row is header of the qvd). I am attaching the excel from the qvd here. It is originally like this  11.png

I want it like below, order does not matter. I tried the discussion How to load a crosstable with two header rows/2 attribute fields.‌ but in their case first row has product and 2nd row has dates which repeat for a product to product for 1st row.

In my case the Departments DP1 or DP2 might appear based on their business month. Hence Jul month has 3 department whilst Aug only has 2 departments.

The problem is that first row has the date merged out of number of departments columns, the second row has the department merged out of 2 columns.

11.png

Please help..

6 Replies

Re: 2 header rows , cross table and mapping

Have you looked at this option: multi_header_pivot_import.qvw

amit_saini
Honored Contributor III

Re: 2 header rows , cross table and mapping

Hi,

PFA!

Thanks,

AS

adnan_rafiq
Contributor II

Re: 2 header rows , cross table and mapping

Hi Sunny thanks for the reply I have not tried this solution yet but it seems like it makes the horizontal dimensions as a inline load, in my case the Department DP1,DP2 and DP3 keeps changing per month. If you see Aug only has DP1 and DP2. Further I dont mind of the value in @4,@6,@8,@33 and @35 appear in a different column.

What do you think in you expert opinion?

adnan_rafiq
Contributor II

Re: 2 header rows , cross table and mapping

Hi Amit and Sunny.

I tried the solution you posted by gwassenaar,. The thing is i have files with different amount of line items and the number of horizontal dimenssion is also changing so no pre decided stuff.

Please see attached.

adnan_rafiq
Contributor II

Re: 2 header rows , cross table and mapping

Hi sunindia‌ I tried the solution it had a problem with that.

I am still trying , just wanted to show you the explanation in ppt link so that you can point out if I am doing something wrong here is the whole application, attached https://dl.dropboxusercontent.com/u/52583586/multi_header_pivot_import.qvw

presentation

https://dl.dropboxusercontent.com/u/52583586/Explaination.pptx

anilet123
New Contributor III

Re: 2 header rows , cross table and mapping

Very useful Thanks