dynamic - power query - filter by all when the param is empty -


in excel, power query, want filter data bring when there nothing mentioned in parameter table (which shall bring data) not work...

any suggestions ?

    project = if param {1} [value] =""  "*" else param {1} [value],     "filtered rows" = table.selectrows(#"changed type", each ([project] = project )) 

now query bit changed , have 3 conditions

let      param = excel.currentworkbook(){[name="secim"]}[content],      malzeme = if param {0} [description] = "" "*" else param {0} [description],     proje = if param {1} [value] =""  "*" else param {1} [value],     firma = if param {2} [value] =""  "*" else param {2} [value],      #"filtered rows" = table.selectrows(#"changed type", each ([code] = firma ) , ([project] = proje ) , ([material code] = malzeme )) in     #"filtered rows" 

you need either change condition or not filtering @ all. should work:

"filtered rows" = if project = "" #"changed type" else table.selectrows(#"changed type", each [project] = project)


Comments