The FILLED MAP visualization tool in PowerBI allows one to quickly build a map dashboard, but only if you prepare your data in the RIGHT way.
In my case, I'm trying to build a map of Brazilian states. I have columns for Cities, States, and the Country itself, and have categorized them as "City", "State or Province" and "Country" respectively. There are 26 different states in Brazil, and, while most of them have special characters (ã, á, õ, í, etc), typing them with regular characters usually allows PowerBI encoding to properly understanding.
However, for the state of "Pará", I can't make it appear correctly on the map.
I've tried every possible combination, writing the state field using every possible combination, but they always have the same result: either not appearing at all on the map, or appearing on the state of Pensylvania in US, as shown in the images below.
Every other state works perfectly when written without any special characters, without needing additional clues inside the cell (For example, the state of "São Paulo" is recognized properly when writting "Sao Paulo" in the state cell).
Different combinations
Issue shown on map. The red arrow shows where the state should be highlighted, the yellow arrow shows a wrongly placed state when using "Para, PA" in the state cell
Is there anything I'm forgetting? An additional categorization step, or an internal ID code that I could use to refer to this specific state? The PowerBI documentation shows additional identifier codes for US and Canada states, but for Brazilian states, the only identifier seems to be the state name.
For reference, I'm using PowerBI Desktop, Version 2.96.701.0 64-bit in a 64-bit Windows 10 system.
Related
I am trying Tableau with data extracted from Salesforce. The input includes a "Country" record were the row have different spellings for the same thing.
Example: Cananda, CANADA, CAnada etc.
Is there a way to fix this in Tableau?
The easiest solution is create a group field based on your Country field.
Select Country in the data pane on the left side bar, right click and choose Create Group. Select elements that you want to group together put them into a single group, say Canada, that contains all variations of spelling.
This new group field initially has a name of Country (group). You may want to rename it Country_Corrected. (Or even better, rename the first field, Country_Original, and call the group field simply Country. Then you can hide Country_Original)
Groups are implemented using SQL case statements. They have many uses, but one application is to easily tolerate some inconsistent spellings in your data source without having to change your data. In general, you can specify several transformations like this that take effect at query and visualization time. For very large data sets, or for very complicated transformations, you may eventually want to push some of them upstream in your data pipeline to get better performance. But make those optimizations later when you've proven the necessity.
If the differences are just in case (upper vs lower), you can right-click the Country dimension, and create a calculated field called something like "New Country", and use the following formula to make the case consistent:
upper([Country])
Use this new "New Country" calc dimension instead of your "Country" dimension, and it will group them all without case sensitivity, and display as uppercase. Or you can use "lower" instead of "upper" if preferred.
would like to thank you advance.
New to Power BI but have found that filled Maps does not working despite working on same data with normal Maps.
I am trying to produce a filled map using US States (full state name used).
Could this be a bug with Power BI (as this seems very intuitive for it not to work) or am I missing something?
Screenshots below:
1. Screenshot shows that Maps is working and is picking up on the State names.
Screenshot shows when chart type is switched to Filled Maps, State data is not represented as a filled map.
Hi Simon were you ever able to get the filled maps working? If so do you care to share what you did? I have attempted and am not able to get it to work.
Take a look at this post.
Things to try:
Provide some measure or value to the Color saturation field of your filled map visualisation.
Set the data category of your State property to State/Province (Modelling tab)
Change your state names to use geo location terms, e.g. Washington->Washington, DC.
Include country name: Southampton->Southampton, England.
Specify latitude/longitude as well as above.
I have a situation where I'm using the IEditorDataFilter interface within a custom UltraGrid editor control to automatically map values from a bound data source when they're displayed in the grid cells. In this case it's converting guid-based key values into user-friendly values, and it works well by displaying what I need in the cell, but retaining the GUID values as the 'value' behind the scenes.
My issue is what happens when I enable the built-in group by functionality and the user groups by a column using my editor. In that case the group by headers default to using the cell's value, which is the guid in my case, so I end up with headers like this:
Column A: 7F720CE8-123A-4A5D-95A7-6DC6EFFE5009 (10 items)
What I really want is the cell's display value to be used instead so it's something like this:
Column A: Item 1 (10 items)
What I've tried so far
Infragistics provides a couple mechanisms for modifying what's shown in group by rows:
GroupByRowDescriptionMask property of the grid (http://bit.ly/1g72t1b)
Manually set the row description via the InitializeGroupByRow event (http://bit.ly/1ix1CbK)
Option 1 doesn't appear to give me what I need because the cell's display value is not exposed in the set of tokens they provide. Option 2 looks promising but it's not clear to me how to get at the cell's display value. The event argument only appears to contain the cell's backing value, which in my case is the GUID.
Is there a proper approach for using the group by functionality when you're also using an IEditorDataFilter implementation to convert values?
This may be frowned upon, but I asked my question on the Infragistic forums as well, and a complete answer is available there (along with an example solution demonstrating the problem):
http://www.infragistics.com/community/forums/p/88541/439210.aspx
In short, I was applying my custom editors at the cell level, which made them unavailable when the rows were grouped together. A better approach would be to apply the editor at the column level, which would make the editor available at the time of grouping, and would provide the expected behavior.
I am having a problem in QTP with selection of a web list box and I have exhausted what I know to do to resolve it. I am hoping someone can help.
There are 5 controls in a container, 2 webedit controls and 3 weblist controls. Together, they allow entry of accounts associated with a customer, and there can be 16 accounts for any customer. There are only ever five controls active at any time, whether editing or entering information for an account. When the information for an account is entered and accepted, it changes to a read-only table row and a new set of controls appears below it for entry of the next account.
The information entered in these controls is the account number, type, description, designation, and status. The status value is contingent on the designation, and the items in the list change dynamically depending on what the user specifies for the designation. The status list is not enabled until the designation is specified.
After some experimenting with timing, I was able to get past an issue where the status list for the first account was seen by QTP as disabled even though it was clearly enabled. I was then able to advance to entry of the second account.
I change the designation on the second account and try to select an appropriate item (specified in a data table) in the status list. My specification from the data table is never found. I figured it was a problem with verbiage differences and also that I should probably anticipate that and address it now, so I wrote a function to accept three parameters, the list and up to two search items. My function searches the listbox passed to it and looks for a match (full or partial) on the search items it receives. Here is where I encountered a significant problem.
The list of the control my function received was from the previous iteration of the test, corresponding to the designation of that account. This is why my function was not finding the selection item. The list on the screen shows the appropriate items, which suggests that I am looking at the wrong object. I also get the ‘object is disabled’ message when I put my data table value directly into the list with the select statement.
The active controls are displayed below the readonly presentation of the previously entered accounts. I am very new to QTP, but I also read documentation. My only theory at this point is that ATP is not passing the right list to my function… that perhaps that how it was learned included the position, which will change each time. However, the spy identifies the screen control as the same item I processed for the preceding account, which makes my theory suspect. In addition, the other four controls, which are not dynamically changing, do not present the same problem. I can put the information in them consistently.
I apologize for the length of this question, but I wanted to be as thorough and clear as possible. Can anyone help me get past this obstacle.
There are many possiblities why it is exposing this behaviour, so let's start with something simple:
Did you try a myWebList.Refresh call before you do something with the listbox? Refresh re-identifies the object.
Have you put a break point (red dot) inside the custom function. Just see what is happening there. With the debug viewer you can enter a realtime command in the scope of that function like msgbox myWebList.exist(0) or myWebList.Highlight
Can you see how the disabled property is propagated to the webpage? If you can 'Object Spy' it as TO property, you can add it in the GUI Map description.
A more sophisticated aproach is to create a Description with the weblist properties. If you can read the disabled property as an RO property from the 'Object Spy', you can use it as an identifier like "attribute/customDisabledProperty:=false".
If you cannot correctly read the disabled property, you can create a description object and do a count on the amount of items that match that description on that page with numberOfLists = Browser("my browser").Page("my page").ChildObjects(myDescription).Count and get the last list with Set lastList = Browser("my browser").Page("my page").ChildObjects(myDescription)(numberOfLists-1)
Keep us informed. Depending on how this works out, we can work into a direction for a solution.
I figured this out early this morning. There are 4 different list boxes used, each made visible or enabled dependent on the selection of the previous list. This is why the spy found the one listed when I was using it and also why the items in the list were not appropriate to what I had selected and also why it appeared disabled to QTP but enabled to me.
I was selecting the same designation when trying to spy it. It was intuitive that the controls were all the same. I am also a windows programmer and I would have populated the same list each time with the appropriate list items, and I presumed that was what the web developer was doing. It was not and it took some time to figure that out. Now that I figured it out, everything is working fine, and I came back to report that. This was a significant, time-intensive lesson.
Thank you very much for your input. It is still useful because I am very new to QTP and every thing I learn is of value.
I want to highlight a number of different regions (e.g. all countys) of a country map. Is this possible to achieve when using Google Charts, not using the default bubble-shaped markers? I want the highlights to look like regular drawn regions (i.e. custom regions).
Tried Raphael before and considering switching back to it as it has exactly what I'm after - http://raphaeljs.com/australia.html
I know this post is kind of old but you should be able to do this, you'll have to hack the map a bit. If you look at the source for the map you'll notice a bunch of path elements. Each path element has a "logicalname" property (not attribute). The logical name is just a bunch of data points seperated by #'s. I believe the fourth index should be the region code e.g. 002 for Africa or US for United States. If you did:
$("path").each(function(){ if($(this).prop("logicalname").indexOf("#{REGIONCODE}#") != -1) {/*TO STUFF HERE*/} });
You should be able to target specific regions. Please note that the region codes supplied to the map are dependent on the map resolution.