Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi Sunny,
Lets take an example , i have two tables Sales and Customer. Now i have created one table name Table_to_show, there i have kept all the table names that are there in my data model.
Now i want to create a list box on Tables, that would list all the tables present , when when user click on the table name the data should be populated in straight table.
I do not want to add manually all the fields in the table in the dimension tab. ( because in the real scenario the columns are more so chances are more to do mistake) .
Could you please tell me how to get data populated with the help of $Field and $Table name.
Sales:
LOAD * INLINE [
Country, Sale
USA, 10000
UK, 52220
Germany, 69000
];
Customer:
LOAD * INLINE [
Customer_id, Name
1, Peter
2, John
3, Micheal
];
Table_to_show:
LOAD * INLINE [
Tables
Sales
Customer
];
Thank you,
Ashis
You don't need to create a table which lists all the names, QlikView already provides you these tables -> $Table, $Field. You can view them by checking 'Show System Fields' on the Fields tab of the Sheet Properties window
Now I am not fully sure how your chart is created, but I created two dimensions using the dollar sign expansion
=$(='[' & SubField(Concat($Field, '|'), '|', 1) & ']')
=$(='[' & SubField(Concat($Field, '|'), '|', 2) & ']')
Based on your selection in $Table, the dimensions will change
When Customer is selected
When Sales is selected
I have used 1 as expression and hide the expression from the presentation tab.
I understand that this might not be perfect, but since I don't really know the kind of straight table you are hoping to get, this is the best I can suggest until I know more.
Thank you, I wanted similar thing like the one you did.
Regards,
Ashis Sau
So if i have 100 columns in a table i need to create calculated dimensions using the same syntax for 100 times correct ?
=$(='[' & SubField(Concat($Field, '|'), '|', 1) & ']')
=$(='[' & SubField(Concat($Field, '|'), '|', 2) & ']')
.
.
.
=$(='[' & SubField(Concat($Field, '|'), '|',n) & ']')
Yes, unfortunately you will have to do that. Create this so that it can accommodate the max dimensions across all tables. So, for example if you customer have 2 and Sales have 3 columns, then you have to create 3 of them. In addition you have to make sure that the third dimension only shows when Sales is selected using enable conditions.