Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Crossing the data

Hi All,

i have one table contains structure as follows

Capture.PNG.png

but my requirement is as follows

Capture.PNG.png

i'm attaching Excel files which contains data in Sheet1 and Sheet2.

Please somebody give me reply.

Thanks,

M V

4 Replies
Gysbert_Wassenaar

1. Load the data as it is

2. Create a pivot table with Pnum, Pname and Month as dimensions and sum(Actual) as expression

3. Drag the Month dimension to the right to above the expression. Let go when you see a horizontal blue line.

You should now have a pivot table that resembles your requirement.

You'll need a small inline table to sort the months correctly too. See attached example.


talk is cheap, supply exceeds demand
MayilVahanan

Hi

Use Pivot table and drag and drop . PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

I did this example, I hope you serve

Clever_Anjos
Employee
Employee

If you want to do this at script level you could try something like this

Generic

LOAD Pnum,

     Pname,

     Month,

     Actual

FROM [Book1.xlsx](ooxml, embedded labels, table is Sheet1);

Load Distinct Month

FROM [Book1.xlsx] (ooxml, embedded labels, table is Sheet1);

set v='Noconcatenate Final:';

for t = 1 to FieldValueCount('Month')

    let tab ='Sheet1.'&FieldValue('Month',$(t));

    $(v)

    LOAD *

    Resident $(tab);

    set v='join(Final)';

    drop Table $(tab);

next