Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohanrajsubrama
Contributor II
Contributor II

spliting rows into columns using expression

Hi Guys ,

               I have a column countryname,gender,and total count .when i bring this in qlikview  table it comes like this.

countrygendercount (arrivals)
india male200
india female200
albania male45
albania female50
algeriamale25
algeriafemale75

                 Actually i want my data to be in qlikview table as per client requirement in this format.

countrymale femaletotal numbers
india200200400
albania455095
algeria2575100

               how do i get this .As far now Country and gender is in dimension and count(Arrivals) is in expressions.How can i get this using expression .Can you guys help.

mohanraj subramanian

3 Replies
Not applicable

Hi,

use pivot table.

in that you can drag and set dimension as column as row header.

find the attachemnt.

Niranjan M.

Not applicable

Hi,

If you want always de same number of columns you could use Set Analysis y a chart too.

Dimension: Country

Expresions: male    --> =count({<gender = {"male"}>}    arrivals)

                    female --> =count({<gender = {"female"}>} arrivals)

                    total    --> =count(arrivals)

This way you will always have the columns "male" and "female" even you haven't data of any of them.

Jairo

mohanrajsubrama
Contributor II
Contributor II
Author

Hi Niranjan,

                Thanks for ur Quick reply.And it worked well.

Regards

mohanraj Subramanian.