Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a field called Income that I load from E:\qlikview\data\document1.qvd. I also have a field called Expenses that I load from E:\qlikview\document2.qvd.
In the same script I want to create another field that acts as a flag if the Expenses surpass the Income. My script would go as follows:
LOAD: ...
...
Income_Hotel as Income,
...
FROM: E:\qlikview\data\document1.qvd
LOAD: ...
...
Expenses_Hotel as Income,
...
FROM: E:\qlikview\data\document2.qvd
/*
* Is there any way to do something like if(Expenses_Hotel>Income_Hotel, 1, 0)?
*/
Hope it helps!
LOAD: ...
...
Income_Hotel as Income,
...
FROM: E:\qlikview\data\document1.qvd
Load *,if(Expenses_Hotel>Income_Hotel, 1, 0) AS Flag;
LOAD: ...
...
Expenses_Hotel as Income,
...
FROM: E:\qlikview\data\document2.qvd
I get an error when I reload the script
Could you please attach the application with sample data...
I tried it again and I didn't get an error, but I cant't find Flag in dimensions, do you know where it gets stored?
Could you please attach your script or attach sample application to help you out!
I'd like to, but I'm still not too familiar with qlikview and I dont know how to do that (I'm also using personal edition, I don't know if that's a problem), I just know how to modify existing applications.
Sorry.
Even if it is developed in presonal edition not a problem for me as I am using the licensed one. I will do the required thing and will attach the script.
Hope it helps you now! Let me know if you have any questions!
LOAD: ...
...
Income_Hotel as Income,
...
FROM: E:\qlikview\data\document1.qvd
LOAD: ...
...
Expenses_Hotel as Income,
lookup( 'Income_Hotel', 'PrimaryKeyTable1', 'PrimaryKeyTable2', 'FirstTableName') AS Income1,
if(Expenses_Hotel > Income1,1,0) AS Flag
...
FROM: E:\qlikview\data\document2.qvd