let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Years", each {[Start]..[End]}),
#"Expanded Years" = Table.ExpandListColumn(#"Added Custom", "Years"),
#"Removed Other Columns" = Table.SelectColumns(#"Expanded Years",{"Years"})
in
#"Removed Other Columns"
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Start | End | Years | |||
2 | 2010 | 2015 | 2010 | |||
3 | 2011 | |||||
4 | 2012 | |||||
5 | 2013 | |||||
6 | 2014 | |||||
7 | 2015 | |||||
Sheet1 |
Thx, fixed my problemWith Power Query
Power Query:let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Added Custom" = Table.AddColumn(Source, "Years", each {[Start]..[End]}), #"Expanded Years" = Table.ExpandListColumn(#"Added Custom", "Years"), #"Removed Other Columns" = Table.SelectColumns(#"Expanded Years",{"Years"}) in #"Removed Other Columns"
Book1
A B C D 1 Start End Years 2 2010 2015 2010 3 2011 4 2012 5 2013 6 2014 7 2015 Sheet1