Forum Discussion
Custom Shape Maps Unexpected Error
- 9 years ago
Ok, I think I might know the potential cause of your issue. When you pulled the file off of GitHub, my guess is that you did not save the actual json file. Instead, you probably right-clicked in the ReadMe and did a Save As on the link to the blob. Is that correct?
GitHub shows a preview of TopoJson, GeoJson, etc. blobs on their own page. Unless you download the entire repo, you need to click through the link and save the Raw json instead of the blob preview.
deldersveld It happens with any data set. It even hapens if I type in a random list of countries through Enter Data. Here:
| Country | Amount |
| Australia | 87 |
| Brazil | 12 |
| Canada | 3574 |
| China | 564 |
| France | 254 |
| India | 235 |
| Italy | 5254 |
| Japan | 84 |
| Mexico | 4347 |
| Russia | 89 |
| United States | 135 |
Not sure where your issue lies, but I did not run into an issue with my world-countries.json file. Here's a link to the PBIX as well, so check to see if you can open it: https://www.dropbox.com/s/2eii01rb17ixwhy/WorldCountries.pbix?dl=0
- Anonymous9 years agoNot applicable
Yes I can open it with no trouble. I guess I can only see that it works for other people, but I can't make it work for me. Another worthless new feature I can't use in this damned program.
- Anonymous9 years agoNot applicable
I literally just typed in the stuff in my sample above, set the Country column's data category to Country/Region, and tried to load world-countries.json into the map. Here's the error details:
Feedback Type:
Frown (Error)Timestamp:
2016-10-24T14:19:49.8800528ZLocal Time:
2016-10-24T10:19:49.8800528-04:00Product Version:
2.39.4526.362 (PBIDesktop) (x64)Release:
September 2016IE Version:
11.321.14393.0OS Version:
Microsoft Windows NT 10.0.14393.0 (x64 en-US)CLR Version:
4.6.2. or later [Release Number = 394802]Workbook Package Info:
1* - en-US, fastCombine: Disabled.Peak Working Set:
386 MBPrivate Memory:
260 MBPeak Virtual Memory:
33.9 GBJS Error Message:
Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.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:9328:77)
at Object.saveChangedSliceToDefinition [as save] (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:9354:25)
at ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:8590:113
at UndoRedoService.register (ms-pbi://pbi.microsoft.com/minerva/scripts/explore.js:6265:159)
at PropertyPaneController.save (ms-pbi://pbi.microsoft.com/minerva/scripts/exploreui.js:8589: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:8515:127)
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.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
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)
User ID:
73a57705-1f23-4e51-9f3a-7208da732c7fSession ID:
b9b3d5f6-84b2-47d9-b322-55db2026d8e6Telemetry Enabled:
TrueModel Default Mode:
ImportSnapshot Trace Logs:
C:\Users\khorseman\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot2069757971.zipPerformance Trace Logs:
C:\Users\khorseman\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zipEnabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_forecastEnabledDisabled Preview Features:
PBI_RedShift
PBI_Impala
PBI_Snowflake
PBI_allowBiDiCrossFilterInDirectQuery
PBI_esriEnabled
PBI_mobileReportAuthoringEnabledDisabled DirectQuery Options:
DirectQuery_UnrestrictedRecent Actions:
AddEmptyVisualContainer, AddFieldInRole, VisualContainerPersistProperties, AddFieldInRole, AddVisualContainer, AddFieldToVisual, VisualConversionFormulas:
section Section1;shared Table1 = let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY3LCsIwFER/Re66G/NodakFoUI3iquQxaUJGAi3kqSgfr154PKcYWaUgge5ZM3unjDZCB3sQXcKpoT+k0kyKaq4BKTFZvMXpy2mgN5hdoehqtsWY+Nj5fHpqKDsW+WKL6QSNzwH/DpfLlnl2b7dsmYWXLTBEQlNWeByaJ2JTH1gXILWPw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Country = _t, Amount = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Country", type text}, {"Amount", Int64.Type}})
in
#"Changed Type";Active Section Contract:
{"id":0,"name":"ReportSection","displayName":"Page 1","ordinal":0,"visualContainers":[{"x":10,"y":20,"z":1,"width":280,"height":280,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":10,\"y\":20,\"width\":280,\"height\":280,\"z\":1}}],\"singleVisual\":{\"visualType\":\"shapeMap\",\"projections\":{\"Category\":[{\"queryRef\":\"Table1.Country\"}],\"Value\":[{\"queryRef\":\"Sum(Table1.Amount)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"t\",\"Entity\":\"Table1\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"t\"}},\"Property\":\"Country\"},\"Name\":\"Table1.Country\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"t\"}},\"Property\":\"Amount\"}},\"Function\":0},\"Name\":\"Sum(Table1.Amount)\"}]},\"objects\":{\"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'\"}}}}}],\"dataPoint\":[{\"properties\":{\"fillRule\":{\"linearGradient2\":{\"max\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#01B8AA'\"}}}},\"min\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#ccf1ee'\"}}}}}}}}]}},\"name\":\"VisualContainer\"}"},{"x":441.875759416768,"y":107.2053462940462,"z":2,"width":300,"height":300,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":441.875759416768,\"y\":107.2053462940462,\"width\":300,\"height\":300,\"z\":2}}],\"singleVisual\":{\"visualType\":\"table\",\"projections\":{\"Values\":[{\"queryRef\":\"Table1.Country\"},{\"queryRef\":\"Sum(Table1.Amount)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"t\",\"Entity\":\"Table1\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"t\"}},\"Property\":\"Country\"},\"Name\":\"Table1.Country\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"t\"}},\"Property\":\"Amount\"}},\"Function\":0},\"Name\":\"Sum(Table1.Amount)\"}]}},\"name\":\"VisualContainer1\"}"}],"displayOption":1,"width":1280,"height":720,"config":"{}"}- Sean9 years agoCommunity Champion
deldersveld I'm encountering the same issue as Anonymous (btw I can also open your pbix file and it works fine)
However when I try to use any of your TopoJSON files I get that Error => Here's what I'm doing...
- PWRBIQuestion8 years agoRegular Visitor
I loaded up your 20m US Counties json map into the Power BI drilldown chloropleth map, added the GEOID from the file into my database to correspond with the correct county I wanted, did the same as well for the states, and gave each County/State combination in my access database a unique ID. However, when I try to filter out a specific county in a specific state, the map will populate all of the counties in the US with the same county name even though if is not in the correct state. Do you know a way to only have it display only the county that is in the state that I set a filter for?