Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
is there a way you can select a list via the function dialog box,
so if I have a function; SufF;
let
sumlist = (x)=> List.Sum( x )
in
sumlist
and a list = "alist" = {2,2,2,2,2}
In can just use ; SumF( alist) or
Function.Invoke( SumF,
{alist} )
but the only way I have been able to use the functon dialog box is convert list to table,
then define x as a list sumlist = (x as list )=> List.Sum( x )
and then select the column to be treated as a list, is there a wat to access the list in the function dialog box directly?
Richard
Solved! Go to Solution.
Functions need parameters. Parameters in the "function dialogue" can only be of basic type (plus binary)
So this will work
let
alist = {2,2,2,2,2},
SumF = (x) => List.Sum(x)
in
SumF(alist)
but it won't work if your alist is a parameter, even if that parameter is "list of values".
Apart from the academic aspect - is there a business problem you are trying to solve? You may have to dive deep into Expression.Evaluate().
No, I was just interested to see if there was some trick I was overlooking ,
thanks anyway .
Richard.
Functions need parameters. Parameters in the "function dialogue" can only be of basic type (plus binary)
So this will work
let
alist = {2,2,2,2,2},
SumF = (x) => List.Sum(x)
in
SumF(alist)
but it won't work if your alist is a parameter, even if that parameter is "list of values".
Apart from the academic aspect - is there a business problem you are trying to solve? You may have to dive deep into Expression.Evaluate().
No, I was just interested to see if there was some trick I was overlooking ,
thanks anyway .
Richard.
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 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |