You want to create new fields in script using IF statement?
If yes, then I believe you'd have to either do preceding load or resident load (separate table with one common key joining your 5 table(one fact).
If preceding load then before your load statement, take the field name you suppose to modify and create a new field.
I'd rather first join all the tables as a raw extract table into one fact, store that into QVD (check fact table name, usually the Fact will be created based on your First Table Name)
Load the fact QVD, do preceding load to Qlik script using IF statements.
I'm talking about Qlik Scripting, not SQL script (which I've no idea about)
Consume SQL script, store into qvd, consume qvd, transform it. Much simpler I guess.
Experts might disagree
Yes, I already have the QVD in place for the load and I end up with one "table" if you will.
Could you give me an example of a preceding load?
Let's say Qlik Sense runs it's process and goes through all my SQL summaries - then disconnects from my source. How would I tell QlikSense to continue on to the Preceding section and how exactly would I format it?
I just need an example of the layout and an understanding of how I could write conditions based on my load.
//After storing a QVD (Extract Layer) and fetching QVD Table in new QVF (Transformation Layer)
if(YourFieldName='Yes', 'Show', 'Hide') as NewField;
YourFieldName should be present in your Normal Load table to do the preceding load.
You can do more than 1 Preceding load
And I think it won't effect if Qlik is reading data from SQL and updating it.
As you're doing transformation and creating new field, your old fields gets updated and your new fields will update as well (as it will be looking for values from old field, stored in qvd and applying transformation to new field)