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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vivekjvs
Frequent Visitor

Take input of list of records

Hi experts,

 

How can I give list of records as input to a field. What datatype should I use in my power query code to enable taking input of list of records from the UI.

 

I have records like this

vivekjvs_1-1699954123785.png

I want to utilize the above output in the below function

vivekjvs_2-1699954174352.png

When I click on Choose Column, I am able to see the Query1 option in the dropdown but no columns are there to select.

vivekjvs_3-1699954260377.png

 

Thanks
Vivek

5 REPLIES 5
ronrsnfld
Super User
Super User

If the input to your custom function is to be a List of Records, then the data type would be a List

The above screenshots are results of setting the datatype to list. I was not able to select a list of records even when I used list datatype.

You are only showing the screenshots from the user interface. For assistance, please post the code from the advanced editor.

Please refer to the below screenshots
1) Code in .pq file

vivekjvs_0-1701245063231.png


2) Code which generates a list of records

vivekjvs_1-1701245226067.png

3) In the RunDummyCalc funcion, I am trying to select the above "Query1" but I am not able to see any option to select entire table/ list of records

vivekjvs_2-1701245381439.png

 

Next time post your code as text (using the "code box" from the top menu) to make it easier for those who might help.

 

  • Your Query1 produces a Table, not a list of records.
  • To call your dummy function, from wherever, use something like below which returns Column1 of the table as a List.

 

= runDummyCalc(Query1[Column1])

 

  • I don't know why it doesn't show up in the UI, but you can certainly call a function without the UI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.