5 Replies Latest reply on Aug 15, 2017 1:39 PM by Joe Oppelt

# Create A Single Label/Region from Aggregated Measure

Hi all.

I've been doing far too much research/looking up and just can't seem to find a solution to my problem.

I am trying to create a "transit time" map that simply calculates distance from a center point, to all other zip codes in the US. I have the map colored and looking pretty good, the last thing I'd like is to create labels for the different transit times, in days. You can see the map below:

This is colored by transit time, which is just an estimate based upon the assumed ability to travel 500 miles per day. You can see how it creates sort of custom regions, based on zip codes. However, when I drag transit time to labels, it labels every single zip code (which is a lot). I'd like just a single label per "region." So for example, it would look like the below, which i was able to accomplish by just adding floating text objects to the dashboard. However, this doesn't adjust in size based on device or any sort of zooming in/out.

The workbook is attached. Any help would be greatly appreciated.

Thanks!

• ###### 1. Re: Create A Single Label/Region from Aggregated Measure

Something I'm thinking of is that you can create a calc that you use on the label shelf, and you figure out only ONE zip code per circle, and load the transit time value in it.

So, for instance, you could select a [ZIP] where the [LAT] has the absolute closest value to 40.0 (to pick a value) and a [LNG] that is some function of the highest LNG for the current circle and the highest LNG from the previous circle.  Something like that.  If those two conditions are met, then set the label calc, else null for all other ZIPs.  You'll get only one [Transit Time] per circle, and they'll line up along LAT=40.

• ###### 2. Re: Create A Single Label/Region from Aggregated Measure

I think I understand what you're getting at, but I'm not sure how to employ the idea in practice.

I'm not sure what the LNG function would be in this case. Perhaps lng1 + lng2 / 2? But I'm not sure how I'd get those values apart from randomly picking. Additionally I don't think a static LAT would be all that great, since it would work out weirdly for trying to label areas in Hawaii and Alaska.

Do you have a practical example that might help me better understand it?

• ###### 3. Re: Create A Single Label/Region from Aggregated Measure

I have your sheet open.  I added LNG and LAT to the tooltip.  I picked 40 because it's sort of in the north-to-south middle.

Yes, the function would have to change for HI and AK.   (And is that Puerto Rico in the lower right?)

The LNG function would look something like:  (I'm typing this off the top of my head)

//[perimeter 3]

window_max( if [transit time] = 3 then ATTR([LNG]  END)

// [distance 3 center]

([perimeter 3] + [perimeter 2])/2

And I can't think of a way to do this except to have 8 sets of these calcs.  (But that WOULD lend itself to doing the Alaska/Hawaii ones separately.)

• ###### 4. Re: Create A Single Label/Region from Aggregated Measure

So that set of calcs is finding a central longitude, to label a single zip code that is on that lat/long. I'm not sure this helps in labeling the entire area though, because if you zoom in on an area that isn't including the zip code you've decided on, it does not show the label.

You can also do this by right clicking on a zip code and turning the mark label on for specifically that zip. For example what I've done with Alaska:

I guess I was more hoping there was a way to create groups/sets when [TRANSIT TIME] was a certain value. SET1 when [TRANSIT TIME] = 1 for example.

• ###### 5. Re: Create A Single Label/Region from Aggregated Measure

You're right.  I didn't take zooming into account at all.

Maybe if there3 were some way to do this with LODs so that the transit time could be made into a dimension... but that stock distance formula we find in all the examples forces us into table calcs, which have to be measures.

I'm out of ideas.