February 1, 2019
Hi Guys,
i have 2 tables and i am doing join like here:
1. Source Table
Topology | Tier | Function | VolumeID | ComponentInstance |
Topo1 | Tier1 | Func1 | 1 | 2 |
Topo1 | Tier1 | Funct2 | 1 | 2 |
Topo2 | Tier2 | Funct3 | 5 | 5 |
2. Left join table (i want to get Function from here):
Topology | Tier | Function |
Topo1 | Tier1 | Func1 |
Topo1 | Tier1 | Funct2 |
Topo1 | Tier1 | Funct3 |
Topo2 | Tier2 | Funct6 |
And what i want to achevie is:
Topology | Tier | Function | VolumeID | ComponentInstance |
Topo1 | Tier1 | Func1 | 1 | 2 |
Topo1 | Tier1 | Funct2 | 1 | 2 |
Topo1 | Tier1 | Funct3 | 1 | 2 |
Topo2 | Tier2 | Funct3 | 5 | 5 |
Topo2 | Tier2 | Funct6 | 5 | 5 |
The Key is : Topology&Tier columns for join.
So in result table you can see that for example Topo2 and Tier2 hkey has Funct3 and Funct4 left joined but VolumeID and ComponentInstance are the same like in Source Table.
How can i do this in PQ? Please help,
in attachment please find workbook example.
Jacek
October 5, 2010
Hi Jacek,
Try the attached query. It works in the sense that it gives you the desired table, but relies on filling down missing values for:
Topo 1 : Tier 1 : Funct 3
Topo 2 : Tier 2 : Funct 6
and I don't know if this will always be the correct thing to do.
Regards
Phil
Answers Post
1 Guest(s)