Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following issue:
- I have created several TABS in the 'Edit Script' and have loaded several tables frmo my SQL server.
Tabs:Invoice, Shipment, Journal
Tables: InvoiceHeader, InvoiceLines, ShipmentHeader, Journal
Now I created a new TAB named 'Tests' where I want to create a new table (Tests) where I want to make a new variable based on the several variabeles I created the other tables.
Tests:
LOAD
if([J_Country_Region Code]=[S_Ship-to Country_Region Code],if([Country Code]='BE','Test OK','Country of Stock Error'),if([Country Code]='BE','Test OK','Shipping Country Error')) AS 'Test 5A';
If I reload my script, it does not create this table or the variable 'Test 5A' I would like to use in my table.
What should I do to make this work or should I create this variable in SQL on my server?
Sidenote:
- I use the renamed variables in this statement from the other tables. I must do this because several variables have the same neam ein the different tables
- I cannot use an expression in qlikview itself to do this because I want to create a pie chart and when I then click on the chart results it looks at the dimensions used in the expression instead of simply looking at the dimension itself.
Hi,
Use let to create and initialize a variable like this
SET Test5A = Your if condition;
When I checked you If condition it has more parameters. If has only 3 parameters, Expression, True value and False value. But your expression has 4 values.
Regards,
Jagan.
Hi,
Maybe I'm not clear with your point. Let try this
IF ([J_Country_Region Code]=[S_Ship-to Country_Region Code],
(IF [Country Code]='BE','Test Ok','Country of Stock Error'),
(IF [Country Code]='BE','Test OK','Shipping Country Error')
) AS [Test5A];
I think this one does not make sense. Because [Country Code]='BE' is use two time with different condition. If you can attached your small application then is make easy to understand what you looking for.
Regards,
Sokkorn Cheav