Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Change Vertical data to Horizontal Dimension

HI, folks i have been struggleing with this and need some help.   I have some data in a QV Document that is in what i call a vertical format now like example below

4-6-2012 12-56-02 PM.gif

I want to convert it so that when i view in QV table object as this way

4second one.gif

I think i should be able to do it with Set analysis... I don't want to do it with the load script because i also need to be able to do a search on all owners with a particular model of car in a particular zipcode... etc.  but when i display the results of a serch in a report format i want to see all the customers cars on one line.

nothing  i have tried so far seems to work.

Thanks in advance! 

1 Solution

Accepted Solutions
Not applicable

Change Vertical data to Horizontal Dimension

Three expressions in a chart, 1 for each car.

=maxstring(IF(Car# = 1, Cars))

=maxstring(IF(Car# = 2, Cars))

=maxstring(IF(Car# = 3, Cars))

9 Replies
jason_michaelid
Honored Contributor II

Change Vertical data to Horizontal Dimension

If you don't have to split them into separate fields (which I think you have to use the load script for then you could use Concat().  So in your straight table chart above your dimensions would be Customer Number, Name, Gender and Zipcode, and your expression would be:

=Concat(DISTINCT Cars,'; ')

Or, if you wanted the car number as well then:

=Concat(DISTINCT Car# & ' ' & Cars,'; ')

Hope this helps,

Jason

Not applicable

Change Vertical data to Horizontal Dimension

Yes i only want to view them as though they were seperate fields.    I am trying to keep from creating the same data twice.  So i have it all in one field so that i can do a search for any customer with a particular car but when i diplay that customer i want to see all the cars they may have on the same line.

thanks for the help.

jason_michaelid
Honored Contributor II

Change Vertical data to Horizontal Dimension

Did that work then?

Not applicable

Change Vertical data to Horizontal Dimension

Three expressions in a chart, 1 for each car.

=maxstring(IF(Car# = 1, Cars))

=maxstring(IF(Car# = 2, Cars))

=maxstring(IF(Car# = 3, Cars))

MVP
MVP

Re: Change Vertical data to Horizontal Dimension

Hi,

Please find the attached file, hope it helps you.

Regards,

Jagan.

Not applicable

Change Vertical data to Horizontal Dimension

Inspired by Jagan's post I also realised you can also do it by putting the Car number as dimension:

='Car ' & Car#

Then pivot it up to the top and put the expression as:

=maxstring(Cars)

Same result as my previous, less expressions.

Not applicable

Change Vertical data to Horizontal Dimension

Thanks a ton!  The your later reply also would work but this one seems to work the best for my issue.

This is a big help.  Thanks so much!

Not applicable

Change Vertical data to Horizontal Dimension

there is another solution to your problem...you can use the concept of transpose in the pivot table...i am attaching the snap shot of the document which i have developed if it works for you tell me i will provide you the whole solution.horizontal to vertical data.JPG

Not applicable

Re: Change Vertical data to Horizontal Dimension

Hi, can you share your sample qvw? I am searching exactly such solution. Thanks !

Community Browser