cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amarcos Frequent Visitor
Frequent Visitor

shape map

 

i want to use some countries shape maps that are not in Power BI, for example Finland, i downloaded the GeoJSON file from here

http://code.highcharts.com/mapdata/

Finland http://code.highcharts.com/mapdata/countries/fi/fi-all.geo.json

Then I opened in http://mapshaper.org/ and exported as TopoJSON

When i open it in Power IB I can not see the map only linesCapturar 2016-09-21 01_36_30.png

Can you help me?

 

I just need TopoJson files from

Regiosn in Finland

Communitues in Spain

Regions in Norway

Regions in Sweden

Thanks

 

16 REPLIES 16
Super User
Super User

Re: shape map

@amarcos This blog by @deldersveld will probably help you resolve the issue.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Re: shape map

Thanks @Seth_C_Bauer. I've also added Finland to my TopoJSON repository: https://github.com/deldersveld/topojson

amarcos Frequent Visitor
Frequent Visitor

Re: shape map

Thanks a lot

I already looked at this, but I couldnt find a solution

 

amarcos Frequent Visitor
Frequent Visitor

Re: shape map

Thanks a lot

I dowloaded finland-regions.json

but when I add this to power BI it gives me an unexpected error. Capturar 2016-09-21 04_45_58.pngWhy could be this?

 

Re: shape map

Are you running the August 2016 version 2.38.4491.282? If so, can you post the text of the error detail? An earlier version of the Shape Map could not handle unicode characters and would give an error mentioning "btoa" conversion somewhere in the text. I tested it in the aforementioned version, and the regions map displays for me.

 

FinlandRegions.PNG

 

 

 

 

amarcos Frequent Visitor
Frequent Visitor

Re: shape map

@deldersveld I'm using version 2.38.4491.282 64-bit (August, 2016)

 

And this is the Error Message:

An error occurred while rendering the report.

Stack Trace:

Microsoft.Mashup.Host.Document.JavaScriptException: An error occurred while rendering the report.
Error: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
at Error (native)
at saveSliceToDefinition (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:7606:77)
at Object.saveChangedSliceToDefinition [as save] (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:7632:25)
at ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6874:113
at UndoRedoService.register (ms-pbi://pbi.microsoft.com/minerva/scripts/explore.js:6000:159)
at PropertyPaneController.save (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6873:93)
at fn (eval at <anonymous> (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:1:0), <anonymous>:4:382)
at PropertyCardController.destination.(anonymous function) [as cardChanged] (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:9739:22)
at PropertyCardController.sliceChanged (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:6799:26)
at fn (eval at <anonymous> (ms-pbi://pbi.microsoft.com/minerva/scripts/angular.js:1:0), <anonymous>:4:323)

Invocation Stack Trace:

at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<SendAndMarshalExceptions>b__0(Object null)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


JS Error Message
Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

Recent Actions
SavePropertyPane, SavePropertyPane, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, VisualContainerUpdateDimensions, SavePropertyPane, SavePropertyPane, SavePropertyPane, SavePropertyPane

Active Section Contract
{"name":"ReportSection3","displayName":"Finland","ordinal":3,"visualContainers":[{"x":0,"y":89.32593180015861,"z":1,"width":421.25297383029346,"height":297.4147501982554,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":0,\"y\":89.32593180015861,\"z\":1,\"width\":421.25297383029346,\"height\":297.4147501982554}}],\"singleVisual\":{\"visualType\":\"barChart\",\"projections\":{\"Category\":[{\"queryRef\":\"Finland.State / Province\",\"active\":true}],\"Y\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"State / Province\"},\"Name\":\"Finland.State / Province\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"}]}},\"name\":\"VisualContainer\"}"},{"x":0,"y":414.4647105471848,"z":2,"width":367.45440126883426,"height":303.50515463917526,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":0,\"y\":414.4647105471848,\"z\":2,\"width\":367.45440126883426,\"height\":303.50515463917526}}],\"singleVisual\":{\"visualType\":\"filledMap\",\"projections\":{\"Category\":[{\"queryRef\":\"Finland.State / Province\",\"active\":true}],\"Size\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}],\"Series\":[{\"queryRef\":\"Finland.code\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"State / Province\"},\"Name\":\"Finland.State / Province\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"code\"},\"Name\":\"Finland.code\"}]},\"objects\":{\"dataPoint\":[{\"properties\":{\"fillRule\":{\"linearGradient2\":{\"max\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#01B8AA'\"}}}},\"min\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#ccf1ee'\"}}}}}}}}]}},\"name\":\"VisualContainer1\"}"},{"x":412.1173671689136,"y":46.693100713719275,"z":3,"width":812.0539254559874,"height":647.6130055511499,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":412.1173671689136,\"y\":46.693100713719275,\"z\":3,\"width\":812.0539254559874,\"height\":647.6130055511499}}],\"singleVisual\":{\"visualType\":\"shapeMap\",\"projections\":{\"Value\":[{\"queryRef\":\"Sum(Finland.SEEs)\"}],\"Category\":[{\"queryRef\":\"Finland.code\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"f\",\"Entity\":\"Finland\"}],\"Select\":[{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"SEEs\"}},\"Function\":0},\"Name\":\"Sum(Finland.SEEs)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"f\"}},\"Property\":\"code\"},\"Name\":\"Finland.code\"}]},\"objects\":{\"dataPoint\":[{\"properties\":{\"fillRule\":{\"linearGradient2\":{\"max\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#01B8AA'\"}}}},\"min\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#ccf1ee'\"}}}}}}}}],\"shape\":[{\"properties\":{\"map\":{\"geoJson\":{\"type\":{\"expr\":{\"Literal\":{\"Value\":\"'shared'\"}}},\"name\":{\"expr\":{\"Literal\":{\"Value\":\"'usa.states.topo'\"}}},\"content\":{\"expr\":{\"ResourcePackageItem\":{\"PackageName\":\"ShapeMap\",\"PackageType\":2,\"ItemName\":\"usa.states.topo\"}}}}},\"projectionEnum\":{\"expr\":{\"Literal\":{\"Value\":\"'albersUsa'\"}}}}}]}},\"name\":\"VisualContainer2\"}","popOutMode":0}],"displayOption":1,"width":1280,"height":720,"config":"{}"}

 

Re: shape map

Can you post a PBIX or a dataset? I see the "btoa" encoding error in your message.

amarcos Frequent Visitor
Frequent Visitor

Re: shape map

Re: shape map

Thanks. I wonder if this is perhaps a regional Windows setting. I was able to open your file and use the finland-regions.json file with your data. I've uploaded the PBIX from which I took the screenshot below. What happens if you open it on your computer?

https://www.dropbox.com/s/wyclqwjo8dh2z0d/Finland.pbix?dl=0

 

Finland.PNG

 

 

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)