比如这样,但我不想在右侧的应用步骤中显示month, year,有什么办法优化一下么。
month = Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
筛选的行 = Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year),
比如这样,但我不想在右侧的应用步骤中显示month, year,有什么办法优化一下么。
month = Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
筛选的行 = Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year),
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"name", type text}, {"date", type date}}),
筛选的行 = [
month=Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
result=Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year)
][result],
a = Table.TransformColumns(筛选的行,{{"name", each _}, {"date", each Date.ToText(_, "M月d日")}})
in
Table.Group(a, {"name"}, {{"计数", each Text.Combine([date], ",")}})
步骤里嵌套 let in 或者record
显示步骤的前提是,在 in 之后跟最后一个步骤的名称,比如:
let
month = Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
筛选的行 = Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year)
in
筛选的行
只要打破这个规则就不显示步骤了,比如把最后一步的表达式写到 in 之后:
let
month = Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow())
in
Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year)
只会显示一个步骤。
。这样其他步骤也不显示了。。。我只想隐藏 month 和year 两步。
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"name", type text}, {"date", type date}}),
month = Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
筛选的行 = Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year),
a = Table.TransformColumns(筛选的行,{{"name", each _}, {"date", each Date.ToText(_, "M月d日")}})
in
Table.Group(a, {"name"}, {{"计数", each Text.Combine([date], ",")}})
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"name", type text}, {"date", type date}}),
筛选的行 = [
month=Date.Month(DateTime.LocalNow()),
year = Date.Year(DateTime.LocalNow()),
result=Table.SelectRows(更改的类型, each Date.Month([date]) = month and Date.Year([date]) = year)
][result],
a = Table.TransformColumns(筛选的行,{{"name", each _}, {"date", each Date.ToText(_, "M月d日")}})
in
Table.Group(a, {"name"}, {{"计数", each Text.Combine([date], ",")}})
步骤里嵌套 let in 或者record