Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
h2bi
Partner - Contributor III
Partner - Contributor III

Crosstable Transpose Rows into Columns Qlik sense

So i have a table in an excel sheet, which people enter data manualy, each person registers the number of task done and time for each task under his name and that day's date

h2bi_1-1705577996287.png

For example i am Jack i did 23 cleanning tasks that took me 24 minutes in 8/10/2023, Jack registered 23 and 24 in Cleanning and Time rows in 08/10/2023 and Jack column as you can see

Qlik loads the table like this:
table:
LOAD
   "Date",
    "45207",
    "452071",
    "452072",
    "45210",
    "45211",
    "45216",
    "45223"
FROM [lib://table.xlsx]
(ooxml, embedded labels, table is Sheet1);

Which those numbers are the dates in numeric values, the table looks like this when loaded:

h2bi_2-1705578116135.png

 

So i need to transpose the rows into columns to look like this in Qlik sense script editor:

h2bi_3-1705578175623.png


I tried croosstable but it shows like this:

The script

h2bi_1-1705578662676.png

 

The output

h2bi_0-1705578608856.png

 

Note: i cannot edit the excel sheet, everything must be done in QLik sense

Any idea of a possible solution?

 

Labels (3)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

@h2bi Perhaps this

LOAD Date, Person, Cleanning, Time, DIY, Time1, Paperwork, Time2, Flushing, Time3
FROM [lib://AttachedFiles/table.xlsx]
(ooxml, embedded labels, table is Sheet1, filters(
Rotate(left),
Rotate(left),
Rotate(left),
Rotate(left),
Transpose()
));

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
Anil_Babu_Samineni

@h2bi Perhaps this

LOAD Date, Person, Cleanning, Time, DIY, Time1, Paperwork, Time2, Flushing, Time3
FROM [lib://AttachedFiles/table.xlsx]
(ooxml, embedded labels, table is Sheet1, filters(
Rotate(left),
Rotate(left),
Rotate(left),
Rotate(left),
Transpose()
));

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
h2bi
Partner - Contributor III
Partner - Contributor III
Author

Amazing man!

it worked, how did you do that could you explain to me?

Thanks you

Anil_Babu_Samineni

@h2bi It's kind of transpose() for bad data structure. I used Qlik view for this (It has more flexible) and share it with you. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
h2bi
Partner - Contributor III
Partner - Contributor III
Author

Thanks a lot man! i really appreciate it, now that i have each task name in a column and next to it its Time column, do you have any idea on how can i put all those task names into 1 column and next to it the corresponding number of task new column and a Time column like this

Date, Person, Task, NumberofTasks, Time

 

Or
MVP
MVP

For dealing with Excel files, I strongly recommend grabbing a copy of QlikView. The Excel wizard there makes life so much easier for dealing with messy structures. While Qlik Sense unfortunately lacks matching functionality, it does use the same syntax, so the code can be copy-pasted over.