Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
OrbytaQliker
Contributor II
Contributor II

Change how the records are showed in table

Hi everyone,

I have a table with the following records, in which each record belongs to its column, and in other columns will be empty.

first.png

[01,02,03,04

7090,$(null),$(null),$(null)

X090,$(null),$(null),$(null)

$(null),5090,$(null),$(null)

$(null),X090,$(null),$(null)

$(null),$(null),0090,$(null)

$(null),$(null),X090,$(null)

$(null),$(null),$(null),X090

];

But I'd like to show the data in the following way. Each column should have its records shown from the first row of the table, instead of having a lot of empty space.

after.png

[01,02,03,04

7090,5090,0090,X090

X090,X090,X090,$(null)

];

is this possible by changing table properties or should I need work on the load script?

Thank you very much if you could dedicate some precious time to helping me.

Labels (1)
1 Solution

Accepted Solutions
barnabyd
Partner - Creator III
Partner - Creator III

G'day @OrbytaQliker,

The problem appears to be that you are trying to display values from different rows in the data table onto the same row in the display table. I have two ideas to investigate:

  1. Table Join in the Load Script: separate each column into it's own table and then outer join the tables together. This would work only if you have other key columns to join on
  2. Aggregate in UI table: use the chart function firstsortedvalue() to allow the table to consolidate the rows

My preference would be to find a way to reshape the data in the load script. Where did the data come from? This looks like data that has been concatenated together from different source tables. Maybe need to do table joins rather than concatenate.

Cheers, Barnaby.

Barnaby Dunn
BI Consultant

View solution in original post

2 Replies
maheshkuttappa
Creator II
Creator II

Need to do it in script, something like this

 

T:
Load
trim(01) as 1,
trim(02) as 2,
trim(03) as 3,
trim(04) as 4;
Load * Inline
[01,02,03,04

7090,$(null),$(null),$(null)

X090,$(null),$(null),$(null)

$(null),5090,$(null),$(null)

$(null),X090,$(null),$(null)

$(null),$(null),0090,$(null)

$(null),$(null),X090,$(null)

$(null),$(null),$(null),X090

];

barnabyd
Partner - Creator III
Partner - Creator III

G'day @OrbytaQliker,

The problem appears to be that you are trying to display values from different rows in the data table onto the same row in the display table. I have two ideas to investigate:

  1. Table Join in the Load Script: separate each column into it's own table and then outer join the tables together. This would work only if you have other key columns to join on
  2. Aggregate in UI table: use the chart function firstsortedvalue() to allow the table to consolidate the rows

My preference would be to find a way to reshape the data in the load script. Where did the data come from? This looks like data that has been concatenated together from different source tables. Maybe need to do table joins rather than concatenate.

Cheers, Barnaby.

Barnaby Dunn
BI Consultant