New Member
July 13, 2021
Hi,
In the attached sample file, I have two fields under the User Input tab; ID and SBU_Code. The user will enter a range of values under either of two fields(not both). Upon refreshing, it should dynamically filter the data in query1 and query2 to match the entered ID or SBU_Code.
Currently, I have used List.Contains() to filter just one field list(ID) at a time. I need to add SBU_Code using OR condition or something so that it satisfies the above requirement.
VIP
Trusted Members
December 7, 2016
Hello,
Not sure if I understand your issue properly, but as has been done with the Parameter table for the ID you need to do the same for the SBU_CODE. Make it a table, load it to Power Query, make it a list and then you just put in an OR statement in your M code. In below example I have named your second list as Parameter_2.
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each List.Contains(Parameter,[ID]) or List.Contains(Parameter_2,[SBU_CODE])=true)
Br,
Anders
Answers Post
1 Guest(s)