Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
eduardo_dimperio
Specialist II

Using CrossTable to get Columns name

Hi,

How can I get this output, please?

Input:

DateConsumo
28/070,62
28/070,31
29/070,70
29/070,72

 

Output:

28/0729/07
0.620.70
0.310.72

 

Thank You

Labels (1)
1 Solution

Accepted Solutions
Almen
Creator II

You could try loading your data using Generic LOAD in the Script.

Table 1:

Generic LOAD 

Date,

Consumo

From YourDataSource;

View solution in original post

3 Replies
sunny_talwar

Try this

Table:
LOAD *,
	 AutoNumber(RecNo(), Date) as SNo;
LOAD * INLINE [
    Date, Consumo
    28/07, 0.62
    28/07, 0.31
    29/07, 0.70
    29/07, 0.72
];

FinalTable:
LOAD Distinct SNo
Resident Table;

FOR i = 1 to FieldValueCount('Date')

	LET vDate = FieldValue('Date', $(i));
	
	Left Join (FinalTable)
	LOAD SNo,
		 Consumo as [$(vDate)]
	Resident Table
	Where Date = '$(vDate)';
	
NEXT

DROP Table Table;
Almen
Creator II

You could try loading your data using Generic LOAD in the Script.

Table 1:

Generic LOAD 

Date,

Consumo

From YourDataSource;

eduardo_dimperio
Specialist II
Author

Just Perfect.

 

Thank You