Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
anatle1234
Contributor III
Contributor III

turn row value in to column

hi,

I have this table in data base:

order_id    site_id  ........

1                2

1                3

I have more columns in this table but what I need is for this specific values (site id and order id)  to make it look like this in the table in QV:

order_id  Site A  Site Z

1             2           3

Instead of 2 rows I want to see it in columns but without affecting all other columns in the report..

can someone help?

thanks

Anat

14 Replies
anatle1234
Contributor III
Contributor III
Author

I am using your code but I am not able to get table like you put in your comment. can you please explain in more details what exactly you have in dimension and expression? sorry I am new to QV. I tried to put Row in dimension but it didn't work

anatle1234
Contributor III
Contributor III
Author

I am not able to drag the blue sign is always vertical. what did you put in expression? you have orderID and RawDidsplay as dimensions? how did you drag it

anatle1234
Contributor III
Contributor III
Author

never mind it worked. thanks

anatle1234
Contributor III
Contributor III
Author

another small question.......is there a way to rename Site 1, Site 2 to Site A , Site B? I will always have 2 sites only

Or
MVP
MVP

If it's just two sites, this entire solution was probably a little more elaborate than necessary - the assumption was that it would be a large number (since you used A and Z)...

Something along the lines of:

if(OrderID=previous(OrderID),'Site Z', 'Site A') as SiteForDisplay