Forum Discussion
variable used in multiple queries
- 9 years ago
Think I have it
let
Source = Sql.Database("eu-ske-sql-03", "ANL_ProAss"),
dbo_OEE_FOR_BI = Source{[Schema="dbo",Item="OEE_FOR_BI"]}[Data],#"Sorted Rows" = Table.Sort(dbo_OEE_FOR_BI,{{"ShiftDay", Order.Descending}}),
#"Filtered Rows" = Table.SelectRows(dbo_OEE_FOR_BI, each [LocId]=LineNumberPar)
in
#"Filtered Rows"
Thank you
99% complete ,just failing as to where to insert the parameter in the power query
Parameter is 'LineNumberPar'
Power Query is
let
Source = Sql.Database("server1", "ProApp"),
dbo_OEE_FOR_BI = Source{[Schema="dbo",Item="OEE_FOR_BI"]}[Data],
#"Sorted Rows" = Table.Sort(dbo_OEE_FOR_BI,{{"ShiftDay", Order.Descending}})
in
#"Sorted Rows"
Also the parameter now enables the selection between values "1,2,3,4,5,6,7,8,9" is there a way to include all these values also?
So this would enable the user to select individual lines or include all lines?
Regards
Geoff
Think I have it
let
Source = Sql.Database("eu-ske-sql-03", "ANL_ProAss"),
dbo_OEE_FOR_BI = Source{[Schema="dbo",Item="OEE_FOR_BI"]}[Data],
#"Sorted Rows" = Table.Sort(dbo_OEE_FOR_BI,{{"ShiftDay", Order.Descending}}),
#"Filtered Rows" = Table.SelectRows(dbo_OEE_FOR_BI, each [LocId]=LineNumberPar)
in
#"Filtered Rows"