Monday, May 21, 2012
Register

You are here  >  Forums  >  QlikView  >  Desktop  >  A Complex Pivot Table Problem





A Complex Pivot Table Problem
Last Post 25 May 2009 05:22 PM by QlikConnect. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev
You are not authorized to post a reply.
Author Messages Not Resolved
Raj Kumar
New Member
New Member
Send Private Message
Posts:1
Raj Kumar

--
14 May 2009 07:42 PM
    Hi i am new to Qlikview. I am trying to create a Pivot Table. My Table has 4 fields.
     Country , Person_name , Attribute , Value.
    I want to generate a pivot table for
    all the person whose Height is 6 feet for Country Argentina.
    I know i can do it throgh Macros. But want to avoid Macros. As it is not good for Very large data.
    Uploading my QlikView for ur better understanding. Looking for a Response.

    I have found a solution  by adding a temp_coulm by concatenating the Attribute & Value column with Person_name .
    But here we cannot have multiple selections like

    Height 6 "and" No-of_friends > 12 in user Friendly manner.

    For you understanding i am pasting the Edit Scripts contenet to generate the QVW file , as the QVW file type is not allowed  in the attachmnet.

    Regards Raj

    -----------------------------------------EDIT SCRITS________________________
    Actual_Table:
     LOAD * INLINE [ Country,Person_Name,Attributes,Value
    US,Alica Bina,No_of_Family_Members,4 US,Alica Bina,Income,2000 US,Alica Bina,No_of_Ultility_Bills,6 US,James Chai,No_of_Family_Members,5 US,James Chai,Income,3000 US,James Chai,No_of_Ultility_Bills,1 US,Laura Coman,No_of_Family_Members,1 US,Laura Coman,Income,5000 US,Laura Coman,No_of_Ultility_Bills,2 UK,Peter Syx,Income,2100 UK,Peter Syx,Work_Location_Distance,35 UK,Peter Syx,Age,54 UK,Peter Syx,No_of_Friends,32 UK,Bill Akne,Income,2340 UK,Bill Akne,Work_Location_Distance,122 UK,Bill Akne,Age,64 UK,Bill Akne,No_of_Friends,12 UK,Jemima James,Income,3200 UK,Jemima James,Work_Location_Distance,12 UK,Jemima James,Age,23 UK,Jemima James,No_of_Friends,54 UK,Rocky Yardi,Income,3190 UK,Rocky Yardi,Work_Location_Distance,123 UK,Rocky Yardi,Age,34 UK,Rocky Yardi,No_of_Friends,8 UK,Alica Bina,Income,2100 UK,Alica Bina,Work_Location_Distance,35 UK,Alica Bina,Age,54 UK,Alica Bina,No_of_Friends,32 Argentina,Nicolas Carlos,Work_Location_Distance,32 Argentina,Nicolas Carlos,No_of_Friends,23 Argentina,Nicolas Carlos,Height,6 Argentina,Pablo Baez,Work_Location_Distance,88 Argentina,Pablo Baez,No_of_Friends,9 Argentina,Pablo Baez,Height,7 Argentina,Jerome j Jerom,Work_Location_Distance,32 Argentina,Jerome j Jerom,No_of_Friends,56 Argentina,Jerome j Jerom,Height,5.5 Argentina,Zia Khanam,Work_Location_Distance,45 Argentina,Zia Khanam,No_of_Friends,78 Argentina,Zia Khanam,Height,6 Argentina,Nama Chin,Work_Location_Distance,67 Argentina,Pablo Baez,No_of_Friends,4 Argentina,Pablo Baez,Height,6 Argentina,Rocky Yardi,Work_Location_Distance,44 Argentina,Rocky Yardi,No_of_Friends,44 Argentina,Rocky Yardi,Height,6 ];

    Temp: LOAD Person_Name, Attributes&' '&Value AS Temp_Column RESIDENT Actual_Table;

    -------------------------------------------------------------------------------------------------------
    QlikConnect
    New Member
    New Member
    Send Private Message
    Posts:50
    QlikConnect

    --
    25 May 2009 05:22 PM
    Hi Raj,

    Are you trying to create a pivot table which only contains your criteria? If so you should include a where statement in the script (e.g. where height > 6 and country = 'Argentina')

    The pivot table is just a way of presenting data as a table and select the pivot table as the chart type.

    Sorry for the late reply, hope this helps.
    Kind regards,
    The QlikConnect Team

    QlikConnect.com, an independant community for QlikView enthusiasts.
    You are not authorized to post a reply.