Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouping Rows in Table (Streight/Pivot)

Hi All,

Need your help for grouping rows in Qlikview. Which table should I use?

Datasource is as below.

Column1 Column2

A        10

B        20

C        12

D        15

E        18

F         20

Need Output as below.

Column1  Column2

G1  30

G2  27

E    18

F    20

Regards,

Shankar

4 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Use Calculated Dimension in front end:

=If(Match(Column1, 'A', 'B'), 'G1',

  If(Match(Column1, 'C', 'D'), 'G2', Column2))

Screenshot_1.jpg

Or create the new grouping logic while loading the data.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this,

Map:

Mapping load * inline [

X,Y

A,G1

B,G1

C,G2

D,G2

];

Data:

Load *,ApplyMap('Map',Column1) as Group inline [

Column1, Column2

A,        10

B,        20

C,        12

D,        15

E,        18

F,         20

];

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

irst Option is good but do we have any other option without changing my script.


Regards,

Shankar

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

In that case you can try the option given by mindaugasbacius

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!