Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I have the following table:
Person | date | time1 | time2 |
bob | 05-10-2021 | 2 min | - |
bob | 05-10-2021 | - | 5 min |
roy | 05-10-2021 | 1 min | - |
roy | 05-10-2021 | - | 6 min |
Maybe you see the problem.. I want to have the data in one row and not in the displayed version. My result should look like these:
Person | date | time1 | time2 |
bob | 05-10-2021 | 2 min | 5 min |
roy | 05-10-2021 | 1 min | 6 min |
I was trying lots of joins and concatenation functions, but nothing worked. I hope you can help me.
Create a different field for Composite key which would not be the part of selections on Sheet.
E.g
Load
Category,
Date
Values
Category&'-'&Date as KeyForTime2
Hello,
This happens when you concatenate tables.
Try to find the key field in the table and then try joining time2 data on the key.
You may need to create a composite key field with the combination of Person & Date (Not sure about your exact data).
Thanks,
Ashutosh
You mean creating a synthetic KEY?
No.
Composite Keys are combination of two columns to create uniqueness.
E.g Person&'-'&Date would be BOB-5-10-2021
Thanks,
Ashutosh
Okay, I understand.. but this would crash my analytics process after, if I can't filter through the name and the date.
Create a different field for Composite key which would not be the part of selections on Sheet.
E.g
Load
Category,
Date
Values
Category&'-'&Date as KeyForTime2
Hi @Jens ,
Try below script
Data:
LOAD
Person,
"date",
time1,
time2
FROM [lib://test/Dump.xlsx]
(ooxml, embedded labels, table is Sheet7);
Time1:
Load
Person&"date" as Key,
Person,
"date",
time1
resident Data
where time1<>'-';
Time1:
Load
Person&"date" as Key,
time2
resident Data
where time2<>'-';
Drop table Data;
This isn't working.. the same problem as before
Hi @Jens ,
Strange. The same code is working at my side.
Please find attached QVF for reference.
I've tried your solution. The values time1 and time2 are joined, but the old values ('-') exist futhermore. How can I delete them? @AshutoshBhumkar