Forum Discussion

shekhar_shres's avatar
shekhar_shres
Advocate II
5 years ago
Solved

Table.FromList(List.Distinct(Table[ID]), null, {"ID"}) not working for data type that is number

Hi all,   I am using following query to extract a Unique data from a column of a table.   Table.FromList(List.Distinct(Table[ID]), null, {"ID"})   The above query works fine when the column tha...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Sometimes M thinks that splitting stuff means that it must be text. Try using Table.FromColumns:

     

    = Table.FromColumns({List.Distinct(Table[ID])}, {"ID"})

     

    --Nate

  • CNENFRNL's avatar
    5 years ago
    Table.FromList(List.Distinct(Table[ID]), Splitter.SplitByNothing(), {"ID"})
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi shekhar_shres ,

     

    What does your data look like? 

    The error message show that it can't convert 8 value, maybe you can check if there is an issue with your 8 value, or try to replace the 8 value with another default value to check if the error is resolved.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.