Bullstrik1
Board Regular
- Joined
- Jul 31, 2014
- Messages
- 66
Hi everyone!
I'v been googling this issue for quite some time now, but I wasn't able to find anything related for porwer query so far, and thats why i'm counting with some of your experts help.
To the point:
I have 2 tables i would like to join, based on some date fields (I'm sorry about the unexistant formatting but i don't know how to post Excel tables in this forum, but i'll be glad to post an example excel workbook if you tell me how to :P )
Fact table:
<tbody>
</tbody>
<tbody>
</tbody>Dimensions table:
<tbody>
</tbody>
From this 2 tables, i would like to create a join that would return the folowing table:
<tbody>
</tbody>
Note:
As you can see, sometimes Entry Date is null and there is no way one can retreive that information.
Anyone have an idea how one could do this using power query?
I saw this post with somehting similar to what i want to do but for SQL:
https://blog.oraylis.de/2014/11/com...d-fromto-date-ranges-into-a-single-dimension/
Hopefully it will provide some better insight on what i would like to do.
Thank you, in advance for your help and fr reading this post!
I'v been googling this issue for quite some time now, but I wasn't able to find anything related for porwer query so far, and thats why i'm counting with some of your experts help.
To the point:
I have 2 tables i would like to join, based on some date fields (I'm sorry about the unexistant formatting but i don't know how to post Excel tables in this forum, but i'll be glad to post an example excel workbook if you tell me how to :P )
Fact table:
Ocurrence | Object | Entry Date | Out Date |
A | 1 | 08-02-2017 | |
B | 2 | 07-02-2017 | 07-02-2017 |
C | 1 | 24-12-2016 | 24-12-2016 |
D | 3 | 15-01-2017 | 15-01-2017 |
E | 3 | 16-01-2017 |
<tbody>
</tbody>
<tbody>
</tbody>
Person | Object | DateFrom | DateTo |
1 | 1 | 05-02-2017 | 15-02-2017 |
1 | 3 | 01-01-2017 | 31-01-2017 |
2 | 1 | 01-12-2016 | 04-02-2017 |
2 | 2 | 05-02-2017 | 31-12-2100 |
<tbody>
</tbody>
From this 2 tables, i would like to create a join that would return the folowing table:
Ocurrence | Entry Date | Out Date | Person | Object | DateFrom | DateTo |
A | 08-02-2017 | 1 | 1 | 05-02-2017 | 15-02-2017 | |
D | 15-01-2017 | 15-01-2017 | 1 | 3 | 01-01-2017 | 31-01-2017 |
E | 16-01-2017 | 1 | 3 | 01-01-2017 | 31-01-2017 | |
C | 24-12-2016 | 24-12-2016 | 2 | 1 | 01-12-2016 | 04-02-2017 |
B | 07-02-2017 | 07-02-2017 | 2 | 2 | 05-02-2017 | 31-12-2100 |
<tbody>
</tbody>
Note:
As you can see, sometimes Entry Date is null and there is no way one can retreive that information.
Anyone have an idea how one could do this using power query?
I saw this post with somehting similar to what i want to do but for SQL:
https://blog.oraylis.de/2014/11/com...d-fromto-date-ranges-into-a-single-dimension/
Hopefully it will provide some better insight on what i would like to do.
Thank you, in advance for your help and fr reading this post!