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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Alex_0201
Post Partisan
Post Partisan

Size field in the map visual

Hi, everyone. Help needed, please.

I have 3 columns (Name, Longitue and Lattitude) that are used to plot a regular map visual. I have two groups of data in the name column - Cities and Villages. I would like to use the size field to distinguish between these two groups by making bubbles for all the cities (4 unique Names) of one constant size and other size for all the villages (5 unique Names). What formula should be used in the custom column in Query?

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

8 REPLIES 8
lbendlin
Super User
Super User

add a new calculated column that holds the desired size based on your criteriae.  Then pull that column into the size bucket.

@Alex_0201 I liked @mahoneypat solution assuming you have a column to identify city and village.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

mahoneypat
Employee
Employee

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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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? 

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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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. 

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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi @mahoneypat thanks again! I have another issue with grouping. Can I tag you in that post?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.