Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
New to QlikView, but jumping in with both feet! I've read a couple of posts about this subject and find it clear as mud. Basically, I need to use the criteria in a field that was created upon load to generate an additional field, but I'm getting stuck on when and how to call it.
Here is my original load:(its larger with many more fields, but these give you the gist)
//********* FSAData Table *********
FSA_BaseDataSAP:
LOAD [Reward Paid] as RewardPaid,
[Lead Status]as LeadStatus,
//********* LeadStage ********* | |
// APPROVED |
If([Reward Paid]>'0'
,'APPROVED'
,
// ABANDONED |
If([Reward Paid]='0' AND Match([Lead Status],'Abandoned')
,'ABANDONED'
,
// REJECTED |
If([Reward Paid]='0' AND Match([Lead Status],'Imported in Error','Rejected')
,'REJECTED'
,
// IN PROGRESS |
If([Reward Paid]='0' AND Match([Lead Status],'AWTG_REV','Imported','In Progress','Pending','Postponed','Promoted')
,'IN PROGRESS'
,''))))as LeadStage
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
WHERE LEN([SAP Lead Number])=9;
The question: how would I code the following request to use the data within the newly created field LeadStage in the creation of another new field called LeadActioned with the following requirements:
//********* LeadActioned ********* | |
// ACTIONED |
If([LeadStage]>'0'AND Match([LeadStage],'ABANDONED','APPROVED','PROMOTED','REJECTED')
,'ACTIONED'
,
// NOT ACTIONED
If([LeadStage]>'0'AND Match([LeadStage],'AWTG_REV')
,'NOT ACTIONED'
,''))as LeadActioned,
FROM - Totally lost here as well as where to place this code
I am uncertain how/where to place the load; outside of this load completely? And how do I reference it?
FROM Resident FSA_BaseDataSAP...???
LOL - and I thought the development of LeadStage was convoluted 😉
Jan
QuartersMap << INL785E 1 lines fetched
FSA_BaseDataSAP << FSA 2009-05-01 thru 2009-12-31 1 lines fetched
FSA 2010-01-01 thru 2010-06-30 1 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2010-07-01 thru 2010-12-31 2 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2011-01-01 thru 2011-06-30 3 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2011-07-01 thru 2011-12-31 4 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2012-01-01 thru 2012-12-31 5 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2013-01-01 thru 2013-12-31 6 lines fetched
FSA 2010-01-01 thru 2010-06-30 << FSA 2014-01-01 thru 2014-03-31 7 lines fetched
BaseDataSh@re << Sh@re-14-04-01 1 lines fetched
EquipmentBookings << Equipment Bookings-14-03-01$ 1 lines fetched
Submitter_BaseDataDups << Submitter-14-04-01$ 1 lines fetched
Learn@Siemens << @1 1 lines fetched
ToddsReport << Sheet1$ 1 lines fetched
ManualResets << Manual Reset Dates 1 lines fetched
MinMax << FSA_BaseDataSAP 1 lines fetched
TempCal << AUTOGENERATE(1) 1 lines fetched
MasterCalendar << TempCal 1 lines fetched
--- Script Finished ---
NOTICE IT SAYS Script Finished...yet I cannot close that window now! After forcing the close of the program, I can go back into the script and uncomment just that newest section of code and all works as expected! Why can't I do a preceding load!
Here is a pic of my uncommented code - when I hit load, IT DOES, without issue...
Can you post a screenshot with the code uncommented? So I can see the colorization?
When you kill the task, is it using any CPU or is it idle? Can you post the last few lines of your script?
-Rob
I think I named the files backwards, but here is a pic of the code uncommented as well as the end of my code, which is the master calendar scripting.
I just ran the code again, and it runs beautifully if I comment out the preceding load - I'm baffled
I also exported to a script file, but I don't think that will help any unless you just want to read it in its entirety - to which I would say you have the patience of a Saint...lmao
Jan
The QVS file you posted doesn't seem to to match the script images you posted?
probably because it contains all the misc crap from the developer class that I commented out...there are 8 tabs of script but I only use two of them, everything else is commented...
I only have one qvw...and I exported it to you - I use Main tab for standard sets, Mapping tables for quarters, nothing on Facts or Dimensions (all commented), File Data contains the bulk of my code and what is commented out is part of files I am loading - there is nothing extraneous on that tab. Sales Person tab is all commented, the master calendar tab is all mine nothing extraneous there either. And the exit script tab is blank and always has been.
Again, the file loads perfectly if I simply comment out the preceding load - I don't know how else to prove that to you
Got it. I see you are loading with a wildcard. Try loading just a single file to see if that works. I have run into some limitations with preceding load and wildcard filenames.
-Rob
YUP!!! That was it ☺
It’s always the little things!
Thanks Rob ☺