Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table Structure

I have my table in this format with 12 months of data. 

 

Dim_IDMetric M1Metric M2Metric M3Metric M4Metric M5Metric M6Metric M7Metric M8Metric M9Metric M10Metric M11Header 12
1343324232412345445232154
2457654541234555432321132
334

34

2443657707332523235
423435468883453356825213
5453965324567842235773
6327347858747894534896856456
74565897096754423346985767
8325565869876554321546870896
94235467890986542354546764
1032454567087-98344638775523324

I have to show chart for this with Date as dimension where M1 is Jan, M2 is Feb and so on... 

Is there a way to do that. One way is transposing the columns and have each month data in one column and adding other column as Date Flag.

Dim_IdMetricDate Flag
134Jan
232Jan
323Jan
465Jan
533Jan
145Feb
265Feb
323Feb
444Feb
555Feb

But can i keep the same table structure and do that. coz transposing will increase my data size as Dim_Id will repeat for each month of data??

2 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Please find the enclosed document. Hope it helps you.

Main:

LOAD RowNo() as Key,*;

LOAD * INLINE [

    M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12

    10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120

    130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240

];

Map1:

Mapping

LOAD 'M'&RowNo()as  MonthNumber,MonthName;

LOAD * INLINE [

    MonthName

    Jan

    Feb

    Mar

    Apr

    May

    Jun

    Jul

    Aug

    Sep

    Oct

    Nov

    Dec

];

FOR i=1 to 12

Res_Main:

LOAD Key, M$(i) as Value,ApplyMap('Map1','M'&$(i)) as Month Resident Main;

NEXT

Regards,

Jagan

Not applicable
Author

Did you consider a crosstable-load?

That way, the data-entry can be kept in the structure of your first table, but Qlikview "reads" the data as displayed in your 2nd table.

See attached, hope it helps!

#edit

after reading Jagan's answer I realize that I may have mis-understood the requirement... The first table must be shown in the front-end? In that case, use Jagan's solution 🙂