Hi
I am trying to create a table from date input variable
PeriodFrom variable
let
Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DateFr", type date}}),
AddCri01 = Record.Field(#"Changed Type"{0},"DateFr")
in
AddCri01
PeriodTo variable
let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DateTo", type date}}),
AddCri02 = Record.Field(#"Changed Type"{0},"DateTo")
in
AddCri02
but when i put the above two variable in the below code its not workind
let
AddCri01 = PeiodFrom
AddCri02 = PeiodTo
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Sales", Int64.Type}, {"GC", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= PeiodFrom and [Date] <= PeiodTo)
in
#"Filtered Rows"
I am trying to create a table from date input variable
PeriodFrom variable
let
Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DateFr", type date}}),
AddCri01 = Record.Field(#"Changed Type"{0},"DateFr")
in
AddCri01
PeriodTo variable
let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DateTo", type date}}),
AddCri02 = Record.Field(#"Changed Type"{0},"DateTo")
in
AddCri02
but when i put the above two variable in the below code its not workind
let
AddCri01 = PeiodFrom
AddCri02 = PeiodTo
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Sales", Int64.Type}, {"GC", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= PeiodFrom and [Date] <= PeiodTo)
in
#"Filtered Rows"