# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Creator

## Two columns, split it in to some kind of hierarky? A small puzzle, please help? :-)

Hi

I have been trying for a while to make something cool, and I am about to loose mye mind 😉

This is my simplified dataload, my acctual data contains MUCH more data

How can I make my data in my load to connect and like this:

When I press on Drammen, my two only valid options will be Konnerud & Åssiden

I can make connections/mapping/renaming in my load, but I dont know how to, can anyone help me?

So to sum it up:

1 digit is always Country

2 digits is always Community, shall be connectet to all Countries that starts with same first number

4 digits is always City, shall be connectet to all Communities starts with the same two number
5 digits is always Places, shall be connectet to all Cities that starts with the same four number

Its hard to explain, but please ask if you need a better explanation 🙂

1 Solution

Accepted Solutions
Partner - Champion III

I have also attaced the example QlikView App as a QVW:

12 Replies
Specialist

Hi Anitha ,

Can you be more Specific so that we might play

Master II

See thjis examples:

Master II

Hi Anita,

You can create a custom fields like this:

Number, Name

3, Norge

30, Buskerud

3000, Drammen

30001, Konnerud

30002, Assiden

];

Tab2:

if(Len(Number)=1,Number&'-'&Name) as Country,

if(Len(Number)=2,Number&'-'&Name) as Community,

if(Len(Number)=4,Number&'-'&Name) as City,

if(Len(Number)=5,Number&'-'&Name) as Place

resident Tab1;

still working on connectivity part.

Regards

KC

Best Regards,
KC
Master II

One possible solution to what you want to incorporate into the load level (= number of digits) and then use it as a discriminator column in which you must put each data.

In addition, you must create the "father" of whom depend each record. So 3000 - Drammen, his "father" is 30

Master II

Anita,

Hope I understood your requirement the way you want and hope the below code will work for you..

Number, Name
3, Norge
30, Buskerud
3000,Drammen
30001, Konnerud
30002, Assiden
4, Norge1
40, Buskerud1
4000,Drammen1
40001, Konnerud1
40002, Assiden1
]
;

Tbl_Country:
Number as Country_Key,
Number&'-'&Name as Country
where Len(Number)=1;

Tbl_Community:
NoConcatenate
Left(Number,1) as Country_Key,
Number as Community_Key,
Number&'-'&Name as Community
where Len(Number)=2;

Tbl_City:
NoConcatenate
Left(Number,2) as Community_Key,
Number as City_Key,
Number&'-'&Name as City
where Len(Number)=4;

Tbl_Places:
NoConcatenate
Left(Number,4) as City_Key,
Number as Places_Key,
Number&'-'&Name as Places
where Len(Number)=5;

Partner - Champion III

I have also attaced the example QlikView App as a QVW:

Partner - Champion III

Futhermore this document is very helpful:

Hierarchies

and perhaps even this blog-post:

Unbalanced, n-level hierarchies

Good luck

MVP

very nice

regards

Marco

Master II