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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to extract specific value from list/record using Custom functions in PowerQuery

@ImkeF 

Hello,

 

Thanks in advance for your help.

 

My Source is Sharepoint Online List extracting using 2.0 Beta(Required columns from default view). About 20 columns needed, all 18 columns're fine. Only 2 columns named Manager, Supervisor having the issue. I have used the below function to extract only the "title" from both the columns. These columns Manager & Supervisor showing as a list. List->Record-> with 6 rows from Sharepoint List like id, title, title, sip, email, picture, jobtitle and dept. Using the below function with created Index, I'm able to see only the value populating for first record wherein other remaining rows 're showing error.

Janaa_2-1627624707707.png

 

Function used:

Record.Field([Manager]{[Index]}, "title")

 

Error screenshot from 2nd row:

Janaa_0-1627623427473.png

 

Manager Column in PowerQuery after using the function:

Janaa_1-1627623651067.png

 

Only First record values extrcated from list as Last Name, First Name(as per Sharepoint List values). I have tried changing the Datatype to text evenafter getting the same error.

 

Please let me know how to apply the changes, if any in the function used or we need to use some other function to get the expected results for all the records. 

 

Your insights would be highly appreciated, Thanks again.

 

Regards

Janaa

2 ACCEPTED SOLUTIONS
wdx223_Daniel
Super User
Super User

Record.Field([Manager]{0}, "title")

View solution in original post

Anonymous
Not applicable

@wdx223_Daniel : Thank you for your time. It is working as expected. I have tried with creating an index earlier which is not giving the values for all the records, now with {0} giving expected results for all records.

 

Record.Field([Manager]{0}, "title")

 

Your help & insights 're highly appreciated Daniel 🙂

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

Record.Field([Manager]{0}, "title")

Anonymous
Not applicable

@wdx223_Daniel : Thank you for your time. It is working as expected. I have tried with creating an index earlier which is not giving the values for all the records, now with {0} giving expected results for all records.

 

Record.Field([Manager]{0}, "title")

 

Your help & insights 're highly appreciated Daniel 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors