March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Would like to filter by three elements in my parameter list:
parameter list
departments: admin, sales, marketing
m language:
= Table.SelectRows(#"Changed Type", each ([Department] = ? or [Department] = ? or [Department] = ?))
for example, when coding in javascript I would use:
department[0]
department[1]
department[2]
what can I use in M language?
also don't want to hardcode as the values may change in the future in the parameter list
Solved! Go to Solution.
For my specific issue this can solved by using the or and creating more than one parameter, or in my case I created one parameter and hardcoded one value as that extra value was only to be used in one report,
= Table.SelectRows(#"Changed Type",each ([Department] = Department or [Department] = "Admin"))
For my specific issue this can solved by using the or and creating more than one parameter, or in my case I created one parameter and hardcoded one value as that extra value was only to be used in one report,
= Table.SelectRows(#"Changed Type",each ([Department] = Department or [Department] = "Admin"))
Hi @akhaliq7 please refer to the linked tutorial, it seems exactly what you need:
https://www.youtube.com/watch?v=gFqlfSckc5s
If this post helps, then please consider Accepting it as the solution to help the other
members find it more quickly
This is not what I would like to achieve, I am looking for syntax that I can then use in my M Language, e.g. if I could access elements 2 & 3 in the parameter list which is sales and marketing I would like to change my m language to be the following:
m language:
= Table.SelectRows(#"Changed Type", each ([Department] = Department[1] or [Department] = Department[2] ))
Parameter List
Department
Values
Admin
Sales
Marketing
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |