Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
CreoLTD112
Contributor
Contributor

convert field values into columns Straight.T

Hi.

Im Fairly new to Cliq and coding, just wanted to find out..

I have created a straight table containing the following fields

 

Modified by|Client|Time|Category|Value etc..

 

values running below the column Category are e.g: 1,2,3,4 

I would like to know how can i these fields from running vertically to horizontally as individual fields e.g:

 

Modified by|Client|Time|1|2|3|

any advise or assistance would be highly appreciated, and i do not want to do this with a pivot table, preferably changes made within expressions? just not sure how

Thanks

2 Solutions

Accepted Solutions
sunny_talwar

Sure.... assuming your expression right now is

Sum(Value)

now you can create 5 expressions like this

Sum({<Category = {'1'}>} Value)
Sum({<Category = {'2'}>} Value)
Sum({<Category = {'3'}>} Value)
Sum({<Category = {'4'}>} Value)
Sum({<Category = {'5'}>} Value)

View solution in original post

sunny_talwar

Can you share an image of what you have and explain (in reference to your image) what you are looking to get?

View solution in original post

11 Replies
sunny_talwar

May be use one expression for each Category..... not sure if you only have 4 categories, but if you have more than 4 and they can change over time, I would suggest you to go with the pivot table.
jwjackso
Specialist III
Specialist III

CreoLTD112
Contributor
Contributor
Author

Thanks,however really avoiding the pivot route..its 5 categories which will remain fixed , can you clarify abit more on how this would be accomplished 

sunny_talwar

Sure.... assuming your expression right now is

Sum(Value)

now you can create 5 expressions like this

Sum({<Category = {'1'}>} Value)
Sum({<Category = {'2'}>} Value)
Sum({<Category = {'3'}>} Value)
Sum({<Category = {'4'}>} Value)
Sum({<Category = {'5'}>} Value)
CreoLTD112
Contributor
Contributor
Author

Thanks still dosent seem to be working though, the original data falls part of a column eg: category| fields-from excel Fields under category are required, maybe this could be the issue I am able to extract the values in a straight table (values being 1,2,3,4,5) however need it to display horizontally.
sunny_talwar

I am not sure I follow... do you have an image you can show of what you had before and an image of what happened after you use the above expression?
CreoLTD112
Contributor
Contributor
Author

Hi apologies for the really delayed response, it did work however it just duplicates the exact values 

Colin-Albert

You can transpose the rows and columns by checking the Horizontal option on the Presentation tab of the Chart Properties.

horizontal.JPG

sunny_talwar

Can you share an image of what you have and explain (in reference to your image) what you are looking to get?