Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How do I extract values from List/Rec to text inPowerQuery when extracting data from Sharepoint List

Hello Everyone,

 

When I tried to extract values from Sharepoint list, one particluar column is having values as list, when I clicked on list - Record. It has the below values wherein wanted to extract only "title" as Lastname, Firstname(Original value in sharepoint)

 

id

title - I want to show only this value in that column as Last name, First name.

email

and so on.

 

How do I acheive this in simple steps?

Could you please provide me with the easiest step to achieve this as rest other columns're fine.

 

Thanks in Advance for your prompt time & help.

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Pat,

     

    Thanks for your response and time to look into the error. I have fixed this error this morning by just using the {0} in the existing function to extract the title alone from the list.

     

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

     

    It working as expected with Lastname, Firstname in all the rows.

     

    Thanks again for your time.

     

    Regards

    Janaa

11 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous So, if I understand correctly, in Power Query Editor, find the diverging arrows in the column header to the right of the column name. Click that icon. Deselect everything and then only select the field that you want, title.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler 

       

      Please find my screenshot below. There is no diverging icon present in the column to select the required text here.

      Also I have tried by creating a Customcolumn to populate the text value with an Index(created New column) which I'm looking for with the below function.

       

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

       

      which gives the expected result only for first record where still rest other records shows as an error as below.

       

       

      Please throw some insights to move further.

       

      Thanks for your efforts to get this solved.

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous Everyone,

     

    Any help on this thread would be highly appreciated.

    • Anonymous's avatar
      Anonymous
      Not applicable

      mahoneypat 

       

      Thanks for your quick response, I have brought the data from sharepoint to Power BI comfortably with default view(Beta 2.0) features, definitely Rest API video would help me in other situations however I have only less than 500 records to analyse and out of 20 columns only 2 columns value populated as list(record with id, title, email, etc.) Just wanted to extract only "title" from the record. 

       

      Thanks for your time & support. Your responses with other approches would be highly appreciated.

       

      • mahoneypat's avatar
        mahoneypat
        Microsoft Employee

        You can use a formula like this either in an added custom column or if you modify a transform column step.  I'm assuming yours is a List with a single Record in it.  This gets the first item in the list ({0}) and the [title] field from the record.

         

        = [ColumnWithListInIt]{0}[title]

         

        Pat