We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
is it possible in Power Query M to add a parameter to a function which has a default value?
My goal is that if the function is called the parameter is shown with its default value,
but the value can be changed.
Something like that even if it does not work: (param1, param2 = 20, param3) => ...
Is this possible?
Thank you!
Solved! Go to Solution.
func = (param1, optional param2) => param1 + (param2 ?? 20),
use1 = func(1, 10), // 11
use2 = func(1) // 21
Hello @AlienSx, thank you. But what should I do after I made the parameter optional. Can you give me an example?
func = (param1, optional param2) => param1 + (param2 ?? 20),
use1 = func(1, 10), // 11
use2 = func(1) // 21
Thank you.
Is it possible that a number is displayed as the default parameter value,
when invoking the function.
Something like that, when "20" is already displayed when the function is called
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 6 |