Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
Colleagues, i have some simple model to understand how to join (fill) values by some key field.
I load main table from sheet S1:
Id | Date | Sales |
1 | 01.01.2016 | 34 |
1 | 04.01.2016 | 7 |
1 | 06.01.2016 | 2 |
1 | 07.01.2016 | 5 |
then i need to join to this table all dates by Id field from sheet S2.
My necessary result table:
Id | Date | Sales |
1 | 01.01.2016 | 34 |
1 | 02.01.2016 | - |
1 | 03.01.2016 | - |
1 | 04.01.2016 | 7 |
1 | 06.01.2016 | 2 |
1 | 07.01.2016 | 5 |
1 | 10.01.2016 | - |
Help, please!
Try like below
Temp1 :
Load
Warehouse
[Test.xlsx]
(ooxml, embedded labels, table is S1);
Join
LOAD Id,
Date
FROM
[Test.xlsx]
(ooxml, embedded labels, table is S2);
MyData:
LOAD Id,
Warehouse,
Date,
Sales
FROM
[Test.xlsx]
(ooxml, embedded labels, table is S1);
Outer Join (MyData)
Load * Resident Temp1;
Drop table Temp1;
thanks.
if i change some value in Warehouse field (in second row Man->Main1), i get strange result:
Id | Warehouse | Date | Sales |
1 | Main | 01-01-2016 | 34 |
1 | Main | 02-01-2016 | |
1 | Main | 03-01-2016 | |
1 | Main | 06-01-2016 | 2 |
1 | Main | 07-01-2016 | 5 |
1 | Main | 10-01-2016 | |
1 | Main1 | 01-01-2016 | |
1 | Main1 | 02-01-2016 | |
1 | Main1 | 03-01-2016 | |
1 | Main1 | 04-01-2016 | 7 |
1 | Main1 | 10-01-2016 |
always you want Warehouse as Main. please let me know if more then one warehouse is there m then how how is your output need
First table:
Id | Warehouse | Date | Sales |
1 | 1 | 01.01.2016 | 34 |
1 | 2 | 04.01.2016 | 7 |
1 | 3 | 06.01.2016 | 2 |
1 | 4 | 07.01.2016 | 5 |
Second:
Id | Date |
1 | 01.01.2016 |
1 | 02.01.2016 |
1 | 03.01.2016 |
1 | 10.01.2016 |
Result:
Id | Warehouse | Date | Sales |
1 | 1 | 01.01.2016 | 34 |
1 | 1 | 02.01.2016 | |
1 | 1 | 03.01.2016 | |
1 | 1 | 10.01.2016 | |
1 | 2 | 04.01.2016 | 7 |
1 | 2 | 02.01.2016 | |
1 | 2 | 03.01.2016 | |
1 | 2 | 10.01.2016 | |
1 | 3 | 06.01.2016 | 2 |
1 | 3 | 02.01.2016 | |
1 | 3 | 03.01.2016 | |
1 | 3 | 10.01.2016 | |
1 | 4 | 07.01.2016 | 5 |
1 | 4 | 02.01.2016 | |
1 | 4 | 03.01.2016 | |
1 | 4 | 10.01.2016 |
same output above script . any have attaching sample for your reference
many thanks for help!
and i have one more problem to finish my task...
in first and second source i add one more field Nomenclature Id.
I the same way i need to add dates and nomenclature id from S2.
Please, help..
Test examples in attachment:
necessary result:
Id | Warehouse | Date | Nomenclature Id | Sales |
1 | 1 | 01.01.2016 | a | 34 |
1 | 1 | 01.01.2016 | b | |
1 | 1 | 02.01.2016 | b | |
1 | 1 | 03.01.2016 | c | |
1 | 1 | 10.01.2016 | a | |
1 | 2 | 04.01.2016 | a | 7 |
1 | 2 | 01.01.2016 | b | |
1 | 2 | 02.01.2016 | b | |
1 | 2 | 03.01.2016 | c | |
1 | 2 | 10.01.2016 | a | |
1 | 3 | 06.01.2016 | b | 2 |
1 | 3 | 01.01.2016 | b | |
1 | 3 | 02.01.2016 | b | |
1 | 3 | 03.01.2016 | c | |
1 | 3 | 10.01.2016 | a | |
1 | 4 | 07.01.2016 | d | 5 |
1 | 4 | 01.01.2016 | b | |
1 | 4 | 02.01.2016 | b | |
1 | 4 | 03.01.2016 | c | |
1 | 4 | 10.01.2016 | a |
please upload sample data
People are here to help you, but that doesn't mean that every time you add the one field and show the results are incorrect. Instead request you to share a sample excel which consist of all the required field and also show the expected output for the same, so that it will be easy to find the solution.
in attachment..
If i have more time to find solution by myself, of course, i have do it..
But this source has some people, who have ability help me operatively..
If you do not like the method of contacting my post, sorry...