Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rajender_qlik
Creator
Creator

Data Load into QlikView

Hi Users,

I am looking to change the data which i have in excel to column-wise so I can load into QlikView.

I have data like this as below in the excel file.

   

Date08/21/2017 7:52:09 AM
MachineCOMP-C301-A
COMPRESSOR Section
COMP-C301-A.COMP-C301-A.CSPD.COMPRESSOR SPEED FROM MARKER, MARKER SPEEDRPM334
COMPRESSOR CYLINDER SectionIndex1234
COMP-C301-A.1.1CTD.COMP CYL, DISCHARGE TEMPERATURE MEASURED - DEG F, DISCHARGE TEMPERATUREDGF260247274258
COMP-C301-A.1.1CTS.COMP CYL, SUCTION TEMPERATURE MEASURED - DEG F, SUCTION TEMPERATUREDGF111116115113
COMPRESSOR THROW SectionIndex1234
COMP-C301-A.THROW 1.COMPRESSOR VIBRATION G 5.5KHZ - 200KHZ.1XG1.8745419981.2399268151.2637363671.994505525
COMP-C301-A.THROW 1.VIBRATION G 1HZ - 8KHZ VT LOW CORNER.1XG6.9230771062.8327229024.4688644413.064713001
COMP-C301-A.THROW 1.VIBRATION G 180HZ - 8KHZ VT LOW CORNER.1XG6.7765569692.3443224434.3223443032.783882856

So I need QlikView script which changes the excel data into this format as below when i load it in QlikView.

       

DateMachineSectionTagIndexUnitData
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR SectionCOMP-C301-A.COMP-C301-A.CSPD.COMPRESSOR SPEED FROM MARKER, MARKER SPEEDRPM334
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTD.COMP CYL, DISCHARGE TEMPERATURE MEASURED - DEG F, DISCHARGE TEMPERATURE1DGF260
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTD.COMP CYL, DISCHARGE TEMPERATURE MEASURED - DEG F, DISCHARGE TEMPERATURE2DGF247
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTD.COMP CYL, DISCHARGE TEMPERATURE MEASURED - DEG F, DISCHARGE TEMPERATURE3DGF274
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTD.COMP CYL, DISCHARGE TEMPERATURE MEASURED - DEG F, DISCHARGE TEMPERATURE4DGF258
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTS.COMP CYL, SUCTION TEMPERATURE MEASURED - DEG F, SUCTION TEMPERATURE1DGF111
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTS.COMP CYL, SUCTION TEMPERATURE MEASURED - DEG F, SUCTION TEMPERATURE2DGF116
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTS.COMP CYL, SUCTION TEMPERATURE MEASURED - DEG F, SUCTION TEMPERATURE3DGF115
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR CYLINDER SectionCOMP-C301-A.1.1CTS.COMP CYL, SUCTION TEMPERATURE MEASURED - DEG F, SUCTION TEMPERATURE4DGF113
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.COMPRESSOR VIBRATION G 5.5KHZ - 200KHZ.1X1G1.874541998
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.COMPRESSOR VIBRATION G 5.5KHZ - 200KHZ.1X2G1.239926815
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.COMPRESSOR VIBRATION G 5.5KHZ - 200KHZ.1X3G1.263736367
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.COMPRESSOR VIBRATION G 5.5KHZ - 200KHZ.1X4G1.994505525
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 1HZ - 8KHZ VT LOW CORNER.1X1G6.923077106
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 1HZ - 8KHZ VT LOW CORNER.1X2G2.832722902
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 1HZ - 8KHZ VT LOW CORNER.1X3G4.468864441
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 1HZ - 8KHZ VT LOW CORNER.1X4G3.064713001
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 180HZ - 8KHZ VT LOW CORNER.1X1G6.776556969
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 180HZ - 8KHZ VT LOW CORNER.1X2G2.344322443
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 180HZ - 8KHZ VT LOW CORNER.1X3G4.322344303
08/21/2017 7:52:09 AMCOMP-C301-ACOMPRESSOR THROW SectionCOMP-C301-A.THROW 1.VIBRATION G 180HZ - 8KHZ VT LOW CORNER.1X4G2.783882856

Any help is appreciated.

Thanks.

6 Replies
CarlosAMonroy
Creator III
Creator III

Hi Rajender,

When you load the excel file, QV launches a wizard, so you can achieve what you want. May be doing it a cross table or there are many other transformations that you can do using the wizard.

Hope that helps,

Carlos

rajender_qlik
Creator
Creator
Author

Hi Carlos,

Thanks for your reply. I have tried using those transformations but it doesn't work for what I was looking for.

mariusz_kumansk
Contributor III
Contributor III

Could you send this excel file??

rajender_qlik
Creator
Creator
Author

Hi Mariusz,

  1. i have attached sample data which has excel data in excel tab and also has qlikview format which i need to get it when i load excel into qlikview.
mariusz_kumansk
Contributor III
Contributor III

     My quick solution, maybe this helps you

level.png

machineInfo:

LOAD 

Machine,

Date

FROM

(ooxml, embedded labels, table is Excel, filters(

Rotate(right)

));


LET vMachine = PEEK('Machine',0,'machineInfo');

LET vDate = PEEK('Date',0,'machineInfo');



Data:

CrossTable(X, Data, 3)

LOAD

RecNo() as %KeyRow,

A as Tag,

B as Unit,

C,

D,

E,

F

FROM

(ooxml, no labels, table is Excel)

WHERE

(not WildMatch(A, '*Section*'));



Left Join

LOAD

RowNo() as %KeyRow ,

'$(vMachine)' as Machine,

'$(vDate)' as Date,

trim(@1) as Section

FROM

(ooxml, no labels, table is Excel, filters(

Replace(1, top, StrCnd(contain, 'Section', not, case))

));



DROP Table machineInfo;

DROP Fields %KeyRow, X;

rajender_qlik
Creator
Creator
Author

Thanks for the app and you are missing the Index column data. That's what I am unable to change the data into.