-
Notifications
You must be signed in to change notification settings - Fork 30
/
fxColumnMap.pq
26 lines (26 loc) · 885 Bytes
/
fxColumnMap.pq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(#"Current Headers" as list, #"Updated Headers" as list) =>
let
maxSize = List.Count(#"Current Headers"),
// Recursive Function to Map Appropriate Column Headers
headerMap =
(counter as number) =>
let
currentRow = {
#"Current Headers"{counter},
#"Updated Headers"{counter}
}
in
if maxSize > counter then
List.Combine(
{
{
currentRow
},
@headerMap(counter + 1)
}
)
else
{},
Output = headerMap(0)
in
Output