Discussion board where members can get started with QlikView.
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:
Income_Hotel as Income,
Expenses_Hotel as Income,
* Is there any way to do something like if(Expenses_Hotel>Income_Hotel, 1, 0)?
Hope it helps!
Load *,if(Expenses_Hotel>Income_Hotel, 1, 0) AS Flag;
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.
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.qvdLOAD: ... ... 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
lookup( 'Income_Hotel', 'PrimaryKeyTable1', 'PrimaryKeyTable2', 'FirstTableName') AS Income1,
if(Expenses_Hotel > Income1,1,0) AS Flag