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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Grouping

i have a table like below

 

EMPLOYEE NORelationType
0T38Parents
0T38Self
0T46Parents
0T46Self
0T47Parents
0T47Self
0T47Spouse
0T50Parents
0T50Self
0T50Spouse

i want result like below

EmpNoReGroup
0T38Parents+Self
0T46Parents+Self
0T47Parents+Self+Spouse

is it possible pls help me

3 Replies
swuehl
MVP
MVP

Maybe like

INPUT:

LOAD * INLINE [

EMPLOYEE NO, RelationType

0T38, Parents

0T38, Self

0T46, Parents

0T46, Self

0T47, Parents

0T47, Self

0T47, Spouse

0T50, Parents

0T50, Self

0T50, Spouse

];

Result:

LOAD [EMPLOYEE NO], Concat(RelationType, '+') as GroupRelation

Resident INPUT

GROUP BY [EMPLOYEE NO];

Anonymous
Not applicable
Author

Thanks Stefan

One more help

i have data like below

 

PONODate
22/2/2016
23/3/2016
33/3/2016
34/4/2016
41/1/2016
51/1/2016
5

5/5/2016

i want to get the result like

 

 

PONODateMonth
22/2/2016Month1
23/3/2016Month2
33/3/2016Month1
34/4/2016Month2
41/1/2016Month1
51/1/2016Month1
55/5/2016Month2

pls help me

swuehl
MVP
MVP

Maybe something like

INPUT:

LOAD * INLINE [

PONO, Date

2, 2/2/2016

2, 3/3/2016

3, 3/3/2016

3, 4/4/2016

4, 1/1/2016

5, 1/1/2016

5, 5/5/2016

];

Result:

LOAD PONO,

          Date,

          'Month'&AutoNumber(MonthName(Date),PONO) as Month

RESIDENT INPUT

ORDER BY PONO, Date;

DROP TABLE INPUT;