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: 
prabhas277
Creator
Creator

cross table

Hi  experts,

please find the below attached file which is not in good format by using cross table how we can get in below format

   s1        cmpid     begin    s2         s3       ->This will be names of column

budget   102         k1        2014    aug   

budget   103         k2        2014     aug  

budget   104         k3        2014    aug  

budget   105         k4        2014     aug                 

8 Replies
Not applicable

CrossTable(cmpid,test,4)
LOAD F1 as s1,
F2 as s2,
F3 as s3,
F4 as begin ,
[102],
[103],
[104],
[105]
FROM
C:\Users\MM64324\Desktop\tt.xlsx
(
ooxml, embedded labels, table is Sheet1);

drop Field test;

it works

Chanty4u
MVP
MVP

hi,

pfa

sunny_talwar

May be this:

Table:

CrossTable (cmpid, Value, 4)

LOAD F1 as s1,

    F2 as s2,

    F3 as s3,

    F4 as begin,

    [102],

    [103],

    [104],

    [105]

FROM

text.xlsx

(ooxml, embedded labels, table is Sheet1);

NewTable:

LOAD s1,

  MonthName(MakeDate(s2, Month(Date#(Capitalize(s3), 'MMM')))) as MonthYear,

  s2 as Year,

  Month(Date#(Capitalize(s3), 'MMM')) as Month,

  Num#(cmpid, '##') as cmpid,

  Value

Resident Table;

DROP Table Table;


Capture.PNG

Chanty4u
MVP
MVP

sunny.................

sunny_talwar

Yes my friend?

Chanty4u
MVP
MVP

nothng bro..ur awesome simply

sunny_talwar

Thank you

effinty2112
Master
Master

Hi Prabhas,

CrossTable(cmpid, Data, 4)

LOAD F1 as s1,

     F2 as s2,

     F3 as s3,

     F4 as begin,

     [102],

     [103],

     [104],

     [105]

FROM

text.xlsx

(ooxml, embedded labels, table is Sheet1);

gives:

s1 cmpid begin s2 s3 Data
budget102k12014aug1
budget102k22014aug2
budget102k32014aug3
budget102k42014aug4
budjet102k52014aug5
budget103k12014aug5
budget103k22014aug6
budget103k32014aug7
budget103k42014aug4
budjet103k52014aug8
budget104k12014aug11
budget104k22014aug12
budget104k32014aug13
budget104k42014aug14
budjet104k52014aug15
budget105k12014aug16
budget105k22014aug17
budget105k32014aug18
budget105k42014aug19
budjet105k52014aug20