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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

How to populate table data in table

Hi ,

I have two tables , having 100 columns each.

I  want a list box that would show the table names and when click on the table names , we need table data to be populated  in the straight table or Pivot table.

Could you please suggest how to get this done.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

A suggestion:

  • In your script, create an inline LOAD that creates an unconnected table with one field containing two values: the names of your two tables. Let's assume that you call this field TableToShow. Reload.
  • Create a listbox that displays the values of field TableToShow. Select a single value and in Object Properties->General, enable 'Always one selected Value'.
  • Now create two straight tables, each showing the 100 columns of a different internal table or whatever you need to be visible. Place them on top of each other and resize them so that they match.
  • For the first straight table, open Object Properties->Layout and select 'Conditional' in the Show group and enter an expression like:
    TableToShow='table1name'
    where you replace table1name with the value you loaded in TableToShow in your INLINE table. Do the same for the second table.

Depending on the selection you make in your listbox, only one straight table will be shown at a time.

Best,

Peter

View solution in original post

14 Replies
sunny_talwar

May be you are looking for something like this

Customizable Straight Table

kamal_sanguri
Specialist
Specialist

If you are looking for something to convert a straight table to pivot or vice- versa. Then use the fast change option of charts.

Please see the attached.

By clicking on highlighted button chart will change to pivot and then again to straight chart.

Capture.PNG

RonaldDoes
Partner - Creator III
Partner - Creator III

Hi Ashis,

Like the following example?

Gyazo - e75c1effb255f0cfe2f254258b73cc18.gif

Hope this helps you.

With kind regards,

Ronald

Peter_Cammaert
Partner - Champion III
Partner - Champion III

A suggestion:

  • In your script, create an inline LOAD that creates an unconnected table with one field containing two values: the names of your two tables. Let's assume that you call this field TableToShow. Reload.
  • Create a listbox that displays the values of field TableToShow. Select a single value and in Object Properties->General, enable 'Always one selected Value'.
  • Now create two straight tables, each showing the 100 columns of a different internal table or whatever you need to be visible. Place them on top of each other and resize them so that they match.
  • For the first straight table, open Object Properties->Layout and select 'Conditional' in the Show group and enter an expression like:
    TableToShow='table1name'
    where you replace table1name with the value you loaded in TableToShow in your INLINE table. Do the same for the second table.

Depending on the selection you make in your listbox, only one straight table will be shown at a time.

Best,

Peter

ashis
Creator III
Creator III
Author

Thank you Peter for your reply.

It is working as you suggested.

However in real scenario i have around 150 columns in one table , so manually adding this columns in the straight table is difficult when we talk about two tables. as per your suggestion below:

>Now create two straight tables, each showing the 100 columns of a different internal table or whatever you need to be visible. Place them on top of each other and resize them so that they match.

Is there any way i can populate the field values instead of manually adding them in the dimension tab.

Thank you,

Ashis

ashis
Creator III
Creator III
Author

Hi Sunny,

Thank you for your quick reply. I am looking similar concept however differently. i need all the fields value in the straight table when choose the name of the table from list box. I will only have table name list box.

Thank you,

Ashis

ashis
Creator III
Creator III
Author

Thanks Kamal for your reply, however i am not looking to convert straight table to pivot or vice versa.

sunny_talwar

You might be able to use $Field and $Table to get this to work.... for more help, would you be able to share a sample to take a look?

ashis
Creator III
Creator III
Author

Hi Ronald,

Yes , similar output, I will have list box only having names of the table and once click all the data of the table would be in straight table.

Thank you,

Ashis