我正在尝试在高级查询编辑器中传递截至今天的日期值
let
Source = GoogleBigQuery.Database(null),
#"apple-5a221" = Source{[Name="apple-5a221"]}[Data],
analytics_187358390_Schema = #"apple-5a221"{[Name="analytics_187358390",Kind="Schema"]}[Data],
events_intraday_20200129_Table = analytics_187358390_Schema{[Name="events_intraday_20200129",Kind="Table"]}[Data]
in
events_intraday_20200129_Table
答案 0 :(得分:0)
要传递“今天”动态日期:
花了一个小时后,我找到了一个解决方案[Name="events_intraday_
"&datetime&"
”,并声明了datetime = DateTime.ToText(DateTime.LocalNow(), "yyyyMMdd")
let
datetime = DateTime.ToText(DateTime.LocalNow(), "yyyyMMdd"),
Source = GoogleBigQuery.Database(null),
#"apple-5a221" = Source{[Name="apple-5a221"]}[Data],
analytics_187358390_Schema = #"apple-5a221"{[Name="analytics_187358390",Kind="Schema"]}[Data],
events_intraday_20200129_Table = analytics_187358390_Schema{[Name="events_intraday_"&datetime&"",Kind="Table"]}[Data]
in
events_intraday_20200129_Table
要传递昨天的动态日期:
datetime = Date.ToText(Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1),“ yyyyMMdd”)
let
datetime = Date.ToText(Date.AddDays(Date.From(DateTime.FixedLocalNow()),-1), "yyyyMMdd"),
Source = GoogleBigQuery.Database(null),
#"prutopia-5a221" = Source{[Name="apple-5a221"]}[Data],
analytics_187358390_Schema = #"apple-5a221"{[Name="analytics_187358390",Kind="Schema"]}[Data],
events_datetime_Table = analytics_187358390_Schema{[Name="events_"&datetime&"",Kind="Table"]}[Data]
in
events_datetime_Table