thanks for the reply
updated your code in fSales Advanced editor but facing the below Error
Expression.Error: We cannot apply field access to the type Text.
Details:
Value=Carlota
Key=Product
in fSales Advanced Query Editor
let
PrdCri01 = ProductCriteria,
RegCri01 = RegionCriteria,
Source = Excel.CurrentWorkbook(){[Name="fSales"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Product", type text}, {"Region", type text}, {"Units", Int64.Type}, {"Category", type text}, {"Discount", type number}, {"Price", type number}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each (List.Contains(ProductCriteria[Product],[Product])) and (List.Contains(RegionCriteria[Region],[Region])))
in
#"Filtered Rows"
in RegionCriteria Advanced Query Editor
let
Source = Excel.CurrentWorkbook(){[Name="RegionCriteria"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Region", type text}}),
RegCri01 = Record.Field(Source{0},"Region")
in
RegCri01
in ProductCriteria Advanced Query Editor
let
Source = Excel.CurrentWorkbook(){[Name="ProductCriteria"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}}),
PrdCri01 = Record.Field(Source{0},"Product")
in
PrdCri01
using the file EMT1349Start.xlsm
selected Carlota and Sunshine in Product in excel sheet
selected Europe in Region in excel sheet
can't we use Source{0..2} in RegionCriteria and ProductCriteria advanced editor
today i updated PowerQuery with April2017 updates.
plz HELP