Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mansi_dv
Contributor
Contributor

Adding an extra heading in pivot table

I have made a pivot table as given below by extracting data from an excel sheet.

_________________________________________________________________________________________________

Code ||   April | May | June | July | August | September | October | November | December | January | February | March |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now I want to add an extra header row above as :-

_________________________________________________________________________________________________

         |            Q1             |             Q2                     |                     Q3                       |                Q4                 |

_____|________________ |______________________|____________________________|_____________________|__

Code ||   April | May | June | July | August | September | October | November | December | January | February | March |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Can someone please help me out with this??

15 Replies
tresesco
MVP
MVP

Create an additional field, say 'quarter' in the script; use that as second dimension in pivot table; you can now drag it to column. Hope this helps.

SunilChauhan
Champion II
Champion II

teke quarter column in dimension and drag it to anti clock wise in UI. above

This column

Code||aril| may........................

see the draged field in my attached example ( i mean To field draged from horizontal to Vertical)

hope this helps

Sunil Chauhan
mansi_dv
Contributor
Contributor
Author

By adding a column called quarter in the script and adding it as the second dimension and then dragging it anticlockwise, i get

_Q1_________________________________________________________________________________________|___Q2__________________________________________________________________________________| ___Q3_____________________________________________________________

Code || April | May | June | July | August | September | October | November | December | January | February | March | April | May | June | July | August | September | October | November | December | January | February | March |April | May | June | July | August | September | October | November | December | January | February | March |



All the months come under Q1, then again all the months come under Q2 and so on....

tresesco
MVP
MVP

Something is wrong in your script. Create a sample qvw and share so that we can have a look and help.

mansi_dv
Contributor
Contributor
Author

Here is a sample which I created.

tresesco
MVP
MVP

PFA for sample.

mansi_dv
Contributor
Contributor
Author

Thank you for the reply.

But what if I have loaded the data from an excel file and then I want to add a new column for quarter?

tresesco
MVP
MVP

You have to calculate quarter from your date field. The calculation expression would vary based on your date field. Example:

Load

          'Q' & Ceil(Month/3) as Quarter       // when Month is numeric

Not applicable

What if I want to add a column with entirely new data using script and add it as a new header as explained above for quarters??