Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

anjeepvr
Contributor II

transposing rows to columns ?

HI All,

I have tables like this :

table1:

load

emp_id.

comp_id,

level_id;

table2:

load

level_id,level_value;

table3;

load

comp_id,

comp_name

comp_type;

sample data:

emp_id,comp_id,level_id

a1,           2            ,3

b1             3            ,2

c1          4               ,1

d1          5              1


level_id,level_value

1,1

2,3

3,2

comp_id,comp_name,comp_type

2,               a1            a

3,               a2               a

4,               a3               a

5               b1               b

where comp_names are grouped under comp_type.

not i want to select like

comp_name1 and its rating and comp_name2 and its rating .

which should give me the employees for the selected criteria.

now i want data like

a and b as columns and the respective comp_name under those a and b columns.

Thanks,

Anjee

1 Solution

Accepted Solutions

Re: Re: Re: transposing rows to columns ?

See attached example.


talk is cheap, supply exceeds demand
7 Replies

Re: transposing rows to columns ?

I don't understand what you're asking. Can you post an example of what the result should look like?


talk is cheap, supply exceeds demand

Re: transposing rows to columns ?

Sorry but don't understood your requirements completely.

Can you elaborate little more along with your expected result?

anjeepvr
Contributor II

Re: transposing rows to columns ?

HI,

example2222.JPG.jpg

Above are the tables where each employee will have his competency_name and its corresponding rating in different tables where they are joined using competency_id and level_id.

Now is it possible to select on competency_name wise like

PLANNING with level_value 1 and TRAINING with level_value as 2 and .NET with level_value as 3 then it should show me the employees with these competencies.

Re: transposing rows to columns ?

Yes, it's possible. But it's a bit tricky. It can be done using alternate states and set analysis expressions. If you can post a sample document with some data someone here can try to create a solution for you.


talk is cheap, supply exceeds demand
anjeepvr
Contributor II

Re: Re: transposing rows to columns ?

hi Gysbert,

i have attached the sample document.

Re: Re: Re: transposing rows to columns ?

See attached example.


talk is cheap, supply exceeds demand
anjeepvr
Contributor II

Re: Re: transposing rows to columns ?

Yes i want this only.

Thank you so much.

its working ....

can we group the competeny_names under its competency type

like competencytype TECHNOLOGY WORKED WITH is column which contains all its competency names under this column.

same way SOFT SKILLS will be the column which contains its respective competency names as field values.

total there are five competency types values..so five fields should  be generated.

Is this possible.

if yes,

Could you please help me this scenario.

Thank you,

Anjee

Community Browser