Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Error Table to list

Hi guys I am getiing an error as the only element in my list. Everything goes right untill the last step when i change it to list

 

let
Origen = Excel.Workbook(Web.Contents("https://.....xlsx"), null, true),
filtro_Sheet = Origen{[Item="cuenta",Kind="Sheet"]}[Data],
#"Encabezados promovidos" = Table.PromoteHeaders(filtro_Sheet, [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"cuenta", Int64.Type}}),
#"Duplicados quitados" = Table.Distinct(#"Tipo cambiado"),
Personalizado1 = Table.ToList(#"Duplicados quitados")
in
Personalizado1

  • Hi Anonymous ,

     

    Are the replies above helpful?

     

     

    Best Regards,

    Icey

6 Replies

  • When you click on the Error link it will add another step and tell you what went wrong.  after you corrected that you can then remove the added step.

    • Anonymous's avatar
      Anonymous
      Not applicable

      lbendlin it says that it can not convert the value to text. I though I could store numbers in lists.

      So is that the issue?

      • lbendlin's avatar
        lbendlin
        Super User

        I don't think lists accept any datatype other than variant.

  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello Anonymous 

     

    change your last step to this

    Table.ToList(#"Duplicados quitados",(x)=> Combiner.CombineTextByDelimiter(",")(List.Transform(x, each Text.From(_))))


    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    Are the replies above helpful?

     

     

    Best Regards,

    Icey

    • Anonymous's avatar
      Anonymous
      Not applicable

      Icey  Not that much. they were converting the number into text and I wanted to use th list as filter value and the column was numerical so what I did was to convert the other column to text so I can make the filter to work