Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I would like to do a crosstable.
May I know how to do that?
I found an old post about this. Check: https://community.qlik.com/t5/QlikView-App-Development/crosstable-reversed/td-p/446395
Try like below.
CrossTable(Week,Cost)
Load
*
From tableName
Hi,
thanks for reply.
However, it doesn't work.
try this.
table:
Load *
from tablename;
NoConcatenate
t:
Load
ID,
Num(Date#(Week, 'DD/MM/YYYY')) as Week,
Cost
Resident table;
drop Table table;
t1:
Generic
Load
*
Resident t;
t2:
LOAD DISTINCT ID RESIDENT t;
DROP TABLE t;
FOR i = 0 to NoOfTables()
t3:
LOAD TableName($(i)) AS Tablename AUTOGENERATE 1
WHERE WildMatch(TableName($(i)), 't1.*');
NEXT i
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
LEFT JOIN (t2)
LOAD *
RESIDENT $(vTable);
DROP TABLE $(vTable);
NEXT i
DROP Table t3;
you want to do this in a chart?
Create pivot table
select ID as dimension
select Week as column
use sum(Cost) as expression
Regards