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

Expression Columns into rows

Hi Guys,

              I have a Table in this format.

countrygendercurrent yearprevious yearchange in %
polandmale100000080000020
female600004000033

But my Client requirement should be in this format.when i drag the expressions into rows the table gets crossed.

countryyearsmalefemale
polandcurrent year100000060000
previous year80000040000
change in %2033

here for current year,previous and % change were three different expressions.how can i acheive this any suggestions.

Regards,

Mohanraj Subramanian.

4 Replies
nirav_bhimani
Partner - Specialist
Partner - Specialist

HI,

For that  I think you have to use crosstable concept in script and also calculate all the Expression in script level.

Regards,

Nirav Bhimani

neha_shirsath
Specialist
Specialist

Hii,

Please find the attachment.Hope it will help you.

mohanrajsubrama
Contributor II
Contributor II
Author

Hi Guys,

              Thanks for ur Quick Reply.Its working fine now.

Regards,

Mohanraj Subramanian.

Not applicable

hi

this code also helps you in future

LOAD country,

     gender,

     [current year],

     [previous year],

     [change in %]

FROM

C:\Users\Desktop\test28.xlsx

(ooxml, embedded labels, table is Sheet1);

LOAD  'current year' as years,[current year] as male,[current year] as female

FROM

C:\Users\Desktop\test28.xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate LOAD  'previous year' as years,[previous year] as male,[previous year] as female

FROM

C:\Users\Desktop\test28.xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate LOAD  'change in %' as years,[change in %] as male,[change in %] as female

FROM

C:\Users\Desktop\test28.xlsx

(ooxml, embedded labels, table is Sheet1);

thanks.