Do you really need to use a Table Box? Then yes, add a translation of your Active field values to the table that contains the field; You don't need to create a new table per se.
OTOH Table Boxes are not your typical QlikView object with an endless series of configuration options. They are very limited in what they can do and most of the time they simply serve as debugging tools.
For example, a simple list box can display an expression instead of a field value and as such do the translation on-the-fly without the need to change your data model.
For example, create a list box, select <expression> from the list of available fields and enter something like this in the Expression Editor:
=IF (Active=1, 'Active', 'Inactive')
Thanks for your feedback, I need all the advice I can get as I am only new to this.
What I am doing is setting up very simple reports that can be run and filtered by the user.
Our users are used to table reports (not pie charts etc...)
My basic report structure consist of a series of list boxes that act as filters, and a Table Box that displays the results of the filters. The results from a table box can then be displayed / printed / exported to excel which is exactly what we need at this point in time.
In this instance I'm setting up a report to list company suppliers including all their details if they are active or inactive.
I have used the expression =IF(Active = 0, 'No','Yes') in the List box to display Yes / No in the "Active" Filter... I now need to dispay the results in the table box as Active / Inactive.... (or yes/no) hence my question...
In your opinion, is there anything better I can use to display results in a table format?
Thanks again for your input...
I came back to this with fresh eyes and had another look at some demo reports and found that they were using (straight table) charts instead of table boxes.
Took only a couple of minutes to figure out how to insert a dimension using an expression...
thanks to all for your contributions, but also thanks Peter for questioning my need to use a table box...
thanks for your help...
I think we are on the right track but not there yet.
Here is my script:
ODBC CONNECT32 TO meillive (XUserId is XXXXXXXXXXXXX, XPassword is XXXXXXXXX);
SQL SELECT *
Load *, If(Active = 1, 'Active', 'Inactive') as Active_Logic;
This script runs without any issues but I cannot find the field Active_Logic to map into my Table Box.
To be clear, the values 0 / 1 are in the field pub.creditor.active
I have also tried:
Load *, If(Active = 1, 'Active', 'Inactive') as [Active_Logic];
Load Active, If(Active = 1, 'Active', 'Inactive') as [Active_Logic];
Load Active, If(Active = 1, 'Active', 'Inactive') as 'Active_Logic';
No errors, but cannot find Active_Logic in the list of fields...
am I missing something?
Your help is greatly appreciated...
Thanks for your input.
Are you able to guide me further on how to do this?
So far, I have tried changing my script as per the suggestions in this thread and still cannot see the new table (field) Active_Logic in the list of available fields. the script runs in many ways without giving me any errors, I just can't see the new table that's all. and I know that in my source table (active field) the values are 1/0 because I can see them in my Table box.
For all it's worth, if it makes any difference, the database i'm connecting to is a Progress database.
I know i can create new tables as I have some demo reports and there is the "as" command in the script here and there... however not sure why i cannot see the new table we are creating.
Could it be that the table has been created but I cannot see it in the available fields? I have toggled "Show fields from table" to all the options (All tables / All Tables qualified / creditor) but still cannot see Active _Logic in the Available fields..
Should Active_Logic display in the list of available fields or is there another command I need to put into the script to display this...
As I said at the beginning of the thread, i'm very new to this so I'm still trying to figure these things out...
Any help would be appreciated.