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

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

Reply
nanutum
Helper I
Helper I

Power Query : Google map KPI : "We cannot convert the value 0 to type Table"

i used Googlemap Kpi :  Reverse Geocoding

 

001.png

 

My Code 

 

let
    Source = Excel.CurrentWorkbook(){[Name="GPS"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer_Code", type text}, {"Latitude", type number}, {"Longitude", type number}}),
    #"Rounded Off" = Table.TransformColumns(#"Changed Type",{{"Latitude", each Number.Round(_, 5), type number}, {"Longitude", each Number.Round(_, 5), type number}}),
    #"Added Custom" = Table.AddColumn(#"Rounded Off", "Custom", each try #"Maping"(Number.ToText([Latitude]),Number.ToText([Longitude])) otherwise 0),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"postal_code", "administrative_area_level_1"}, {"postal_code", "administrative_area_level_1"})
in
    #"Expanded Custom"

 

 

Result 

Result GpsResult Gps

 

 in Power Query is not show Error 

when "close and load" show this error 

Screenshot 2020-09-22 143756.png

 

Please Help me

3 REPLIES 3
Jimmy801
Community Champion
Community Champion

Hello @nanutum 

 

what is returning this query?

let
    Source = Excel.CurrentWorkbook(){[Name="GPS"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer_Code", type text}, {"Latitude", type number}, {"Longitude", type number}}),
    #"Rounded Off" = Table.TransformColumns(#"Changed Type",{{"Latitude", each Number.Round(_, 5), type number}, {"Longitude", each Number.Round(_, 5), type number}}),
    #"Added Custom" = Table.AddColumn(#"Rounded Off", "Custom", each try #"Maping"(Number.ToText([Latitude]),Number.ToText([Longitude])) otherwise 0),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"postal_code", "administrative_area_level_1"}, {"postal_code", "administrative_area_level_1"})
in
    Table.SelectRowsWithErrors(#"Expanded Custom")

 

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

 

@Jimmy801 

This code return Address from Lat and Long

 

Jimmy801
Community Champion
Community Champion

Hello @nanutum 

 

i modified this query in order to return your table with all rows that contain an error. So in some way, this result given by my query should give you the row(s) that causing the error when importing in power BI

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Kudoed Authors