Using this data in an Excel Table named Table1:
Code:
MthName
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
This query, named MthXRef, creates a Mth/Value XRef table:
Code:
Table.FromRecords({
[Mth="Jan", MthVal=1],
[Mth="Feb", MthVal=2],
[Mth="Mar", MthVal=3],
[Mth="May", MthVal=4],
[Mth="Jun", MthVal=5]})
This query connects to Table1 and merges it
with the MthXRef query to return the values:
Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Merged Queries" = Table.NestedJoin(Source,{"MthName"},MthXRef,{"Mth"},"MthXRef",JoinKind.LeftOuter),
#"Expanded MthXRef" = Table.ExpandTableColumn(#"Merged Queries", "MthXRef", {"MthVal"}, {"MthVal"})
in
#"Expanded MthXRef"
These are the query results:
Code:
MthName MthVal
Jan 1
Feb 2
Mar 3
Apr null
May 4
Jun 5
Jul null
Aug null
Sep null
Oct null
Nov null
Dec null
Is that something you can work with?