cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Mapping Cumulative Locations

I am trying to map my companies locations and show our growth over time.  I am mapping my locations by Lat, Long.

 

I can use the Play Axis visualization to filter through years, but I want the filter to be able to play through and leave the previous locations but add the new locations for the next year to the map.

 

Example Map shows all locations from 2014 but when the filter plays to show 2015 I want the map to now show 2014 and 2015 locations.

 

Is there a key or calculated column I could add and use that in the Play Axis visualization?

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Mapping Cumulative Locations

Hi @ejhornyak,

 

Nope, current power bi map visual not support this, if you choose 2015, it only show 2015 locations.

 

I'd like to suggest you write a measure to check date and add tag, then drag this tag measure to visual level filter to achieve the filter effect. (filter can't direct effect the map visual, use measure to get value from filter, and use it as parameter to calculate in measure)

 

Sample:

 

Tag =
VAR selectedValue =
    SELECTEDVALUE ( Calendar[Year] )
VAR current_date =
    MAX ( table[date] )
RETURN
    IF ( YEAR ( current_date ) IN { selectedValue, selectedValue - 1 }, 1, 0 )

Drag to visual level filter to filter records with result '1'.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Highlighted
Frequent Visitor

Re: Mapping Cumulative Locations

Thanks for the help.  

 

I was able to get the TAG measure to work correclty to apply a number to the year.  

 

But what I would like to do is use the Play Axis Visual to play through the years and locations cumulatively show on the map. 

 

So what I would need is the tag measure to add a 1 to all of the years less than what the date filter would be. 

Highlighted
Frequent Visitor

Re: Mapping Cumulative Locations

I can right the formula in Excel to say

 

=if(Year<= Selected Year , 1, 0)

 

Just not sure how to write that in DAX

Highlighted
Community Support
Community Support

Re: Mapping Cumulative Locations

Hi @ejhornyak,

 

Maybe you can try to use below formula:

Tag =
VAR selectedValue =
    SELECTEDVALUE ( Calendar[Year] )
VAR current_date =
    MAX ( table[date] )
RETURN
    IF ( YEAR ( current_date ) <= selectedValue, 1, 0 )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors