Forum Discussion
Size field in the map visual
- 6 years ago
Do you already have a column that indicates if that row is a City or Village? If not, you can generate a Groups column to do that easily. See this link on how to do that - https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning
Once you have that, you can use a measure that returns a size for each city depending on if it is a City or Village. For example, you could have one like
Bubble Size = IF(MIN(Date[LocationType]) = "City", 10, 5)
This assumes your new column is called LocationType. You can put that measure in the Size field. You'll have to play with the 10 and 5 values to get what you want.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Do you already have a column that indicates if that row is a City or Village? If not, you can generate a Groups column to do that easily. See this link on how to do that - https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning
Once you have that, you can use a measure that returns a size for each city depending on if it is a City or Village. For example, you could have one like
Bubble Size = IF(MIN(Date[LocationType]) = "City", 10, 5)
This assumes your new column is called LocationType. You can put that measure in the Size field. You'll have to play with the 10 and 5 values to get what you want.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Hi mahoneypat I don't have one. I only know that top 3 rows are cities and the rest are villages. Can I create an index column and use it instead?
- mahoneypat6 years ago
Microsoft Employee
Easier than an index column would be to make a Groups columns. See this link - https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning. It's easy and requires no code. When the wizard dialog opens, click on those first 3, group them, and call that group "City". Highlight the rest and name that group "Village". Hit ok, then make a measure like the one I suggested and use it in the Size field well.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years agoNot applicable
Hi mahoneypat I'm struggling to use this groupping feature. As I understood, I need to create a visual and select all three cities on it. The problem is the group option is greyed out.
- mahoneypat6 years ago
Microsoft Employee
Since you marked it as the solution, I'm assuming you figured it out. If not, grouping is not done on the visual, but on the column with the cities/villages in them. On the right hand side, in the Fields panel, click on the ellipsis next to that column and choose "New Group".
Regards,
Pat