Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Im new to power query. Im trying to filter a table based on a list of values passed as parameter.
Something like this.
dolphin_code is generated from another table by taking distinct values of a column. Something like below.
let
Source = Sql.Database("HOTEDWSQL01", "EDW_Reporting"),
dbo_dim_outlet = Source{[Schema="dbo",Item="dim_outlet"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_dim_outlet, each ([is_orbit] = "No") and ([dolphin_code] <> null)),
dolphin_code1 = #"Filtered Rows"[dolphin_code],
#"Removed Duplicates" = List.Distinct(dolphin_code1)
in
#"Removed Duplicates"
I applied rthis parameter as a filter on a column of a different table.
The M code genrated was like this.
Table.SelectRows(#"Filtered Rows2", each Text.Contains([store_id], BranchCode))
I modified this to
= Table.SelectRows(#"Filtered Rows2", each List.Contains([store_id], BranchCode))
so as to filter by all the values in paramter and not just currennt value.
This gives me an error as below.
Kindly help.
Solved! Go to Solution.
Hi @anushavikram ,
Please change the Suggested value to list of values to have a try.
Regards,
Frank
Hi @anushavikram ,
Please change the Suggested value to list of values to have a try.
Regards,
Frank
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |