Forum Discussion

drmshahid's avatar
drmshahid
New Member
3 years ago

Integer array read as text by power BI, converting the type does not work

Reading data from a PostgreSQL database in power BI. One of the columns in my data is an integer array; so each cell has an array data. When Power BI reads it, it shows it as text. Furthermore, when I try to convert it to number, power BI can not do it. Tried a number of fixes including Python script to modify the type but no success so far. Any ideas?

2 Replies

  • What do you want to do next with it?

    = Text.Split(
    Text.Select([posttimea rray],{"0".."9",","}),",")  // so you get a list
    ------ 
    List.Sum(
    List.Transform(
    Text.Split(
    Text.Select([posttimea rray],{"0".."9",","}),","), Number.From)) // so you get the sum

     


  • Thanks, it works. The eventual goal is to plot the distribution of these array values, combined for all rows (keeping in mind that each array here is in one row), using a suitable Power BI visualization.