Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Edit Script PIVOT Loaded Table


I would like to transform a table that will be loaded in from SQL.  Is it possible to PIVOT this table in the 'Edit Script' statement, just like I would in SQL??

Thank You

3 Replies
Not applicable

Re: Edit Script PIVOT Loaded Table


Could you post a sample doc to get a clear idea??

We can pivot using cross tables/generic loads in edit script!!


Honored Contributor

Re: Edit Script PIVOT Loaded Table

Please write and explain better your idea or what you want to do?

if will be easier to us to help you

thank you


Not applicable

Re: Edit Script PIVOT Loaded Table

So in this example it would be UNPIVOTing data.  Here tblRpt_US_CDFBP_SalesEffectiveness_MonthlyTrends has a column for M1, another columns for M2, and so on...and here i am JOINing on the 'Label' column in tblCfgDynamicLabels


various columns


  ( SELECT * FROM tblRpt_US_CDFBP_SalesEffectiveness_MonthlyTrends WITH

  ) p


  (y FOR numDay IN (M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12) )unpvt


  --select * from

  tblCfgDynamicLabels lbl

  ON unpvt.numDay = lbl.Label

  ORDER BY  categoryorder DESC

I hope that this is helpful

Community Browser