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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
drmshahid
New Member

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?

11power.PNG1power.png

2 REPLIES 2
drmshahid
New Member

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. 

Ahmedx
Super User
Super User

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

 


Screen Capture #1066.pngScreen Capture #1067.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.