Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Dicken
Continued Contributor
Continued Contributor

Power Query Custom Function dialog box



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 


2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Functions need parameters.  Parameters in the "function dialogue"  can only be of basic type (plus binary)

 

lbendlin_0-1741541921109.png

 

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().

View solution in original post

Dicken
Continued Contributor
Continued Contributor

No, I was just interested to see if there was some trick I was overlooking , 
thanks anyway .

Richard. 

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Functions need parameters.  Parameters in the "function dialogue"  can only be of basic type (plus binary)

 

lbendlin_0-1741541921109.png

 

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().

Dicken
Continued Contributor
Continued Contributor

No, I was just interested to see if there was some trick I was overlooking , 
thanks anyway .

Richard. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.