Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone please help me to acheive the below in script editor. Input has been shared,required output structure has also mentioned
Input:
WeekNbr | Takings | TurnOver | TT | TT2 |
WK1 | 200 | 100 | 2 | 4 |
WK2 | 300 | 200 | 1.5 | 3 |
WK3 | 380 | 380 | 1 | 2 |
WK4 | 420 | 140 | 3 | 6 |
Expected Output structure:
Type | WK1 | WK2 | WK3 | WK4 |
Takings | ||||
TurnOver | ||||
TT | ||||
TT2 |
check out crosstable load to transform your column to row. Then you can use the pivot table to present your output
The problem is I will use Vizlib writeback table to show the data, so I have to convert my input structure into the required output structure at the script level only
Can anyone please help. I need the entire structure to be created in Script itself
try below
Data:
CrossTable(Type,Values)
LOAD WeekNbr,
Takings,
TurnOver,
TT,
TT2
FROM
[https://community.qlik.com/t5/Qlik-Sense-App-Development/How-can-I-change-my-rown-in-to-column-and-columns-to-rows/td-p/1737710]
(html, utf8, UserAgent is 'Mozilla/5.0', embedded labels, table is @1);
New:
Generic LOAD
Type,
WeekNbr,
Values
Resident Data;
DROP Table Data;