7 Replies Latest reply: Mar 6, 2017 10:10 AM by Lauren Mills RSS

    How to Edit Script

    Lauren Mills

      I have 5 different SQL summaries feeding my dashboard.


      They all join to each other (on different fields) so I can have my data set.


      How and where would I write in a IF statement - would I create a new section at the end of the 5 SQL summaries?


      Any ideas would help.

        • Re: How to Edit Script
          S Khan

          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

            • Re: How to Edit Script
              Lauren Mills

              Aehman -


              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.

            • Re: How to Edit Script
              Lauren Mills

              If Match Statement


              ^ Question Answered Here