Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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??
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.
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
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....
Something is wrong in your script. Create a sample qvw and share so that we can have a look and help.
Here is a sample which I created.
PFA for sample.
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?
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
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??