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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sherly_m
Frequent Visitor

Get map to present exact value instead of sum

Hi all, 

 

I am very new with Power Bi and I am building a visualisation using map bubbles.

 

I would like to show "number of cars" across countries and years for 4 years (2006,2007,2008,2009). 

When I put my variable on the map, the bubble size show count of "number of cars" instead of the exact value. For example, it shows "3" if I have data for 3 years or "4" if I have the data for 4 years.. 

 

What I did so far was to:

1. Change the value as "sum"

2. Add "year" as a filter, so if my audience chooses 2006, the number of cars in 2006 will show.

 

Is there a way for me to set this without setting a filter for a specific year? For example, if they did not filter any date, it will show the lastest year, i.e. 2009.

 

Thank you. 

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

depending on how your data looks, which is very difficult to say because you haven't provided sample data

but you could do something like this

number of cars - this year
Was current year
Year ( Maximum ( [date] ) )
Return
Calculate ( Sum ( table[number of cars] ), currentyear = Year ( [date] ) )





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

depending on how your data looks, which is very difficult to say because you haven't provided sample data

but you could do something like this

number of cars - this year
Was current year
Year ( Maximum ( [date] ) )
Return
Calculate ( Sum ( table[number of cars] ), currentyear = Year ( [date] ) )





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Dear Vanessa, 

 

Thank you for the code. Does it mean I should create a new measure and then put the new measure in the "values" field? 

 

I use a free version so I can't share my file.... Here is the screenshot. 

Screenshot 2021-03-01 19.07.22.png

Thank you. 

correct you would create a new measure and then put it in the size  area

 

you can still share with the free version however you have to do it with the pbix file by uploading to dropbox and sharing it.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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