Forum Discussion

CahabaData's avatar
CahabaData
Memorable Member
10 years ago

Map visual with count data

the source table is a list of addresses

 

if I create a Map visual using the State field in location it shows a bubble per state for which there is an address.... so far so good

 

I would like the count of address within each state to display - either fixed or when you float the cursor

 

is this an embedded feature to count rows grouped by state? or must I add the value '1' to each row and then do a sum?

 

3 Replies

  • CahabaData's avatar
    CahabaData
    Memorable Member

    Replying to my own post:

     

    Make a query with a new calculated field 'StateCount'

     

    Then with Map tile highlighed, checked this new field

  • AlexChen's avatar
    AlexChen
    Microsoft Employee

    Hi,

     

    For example, you have a states column in your table like below:

     

     

    You can create a measure :

     

    countOfStates = countax(usStates, usStates[states])

     

    Now, you can move countOfStates  to “Size”, see screenshot below. Bigger bubble means the value of countOfStates  is bigger.

    For example, you can see that the count of “Arizona” is 4 which is the biggest. The bubble for it is also the biggest.

    When you move your cursor to bubble, you can see the value of countOfStates for each bubble.

     

     

    You can also move countOfStates to “Tooltips” with bubbles in the same size. See screenshot below.

     

     

    Best Regards

    Alex

     

    • CahabaData's avatar
      CahabaData
      Memorable Member

      thank you for that... I'll need to get more familiar with DAX and the use of measures

       

      so I found a way also, which I posted - by making a query

       

      so there are 2 ways to do this which is good to know and I need to better understand the pros/cons of the differences....

       

      your approach with a measure leaves the original data table alone, while my approach with a query alters the data table but otherwise I'm not sure whether other issues about the approaches are important.