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
cmbellah
Advocate I
Advocate I

Displaying measure used as a slicer on ArcGIS map

My issue is that I need to use a substring of a text column as one of the filters on a map. I have the measure but can't make it appear on its own without the "real" column field. I've created a set of demo data to illustrate my problem. Suppose I have City, Fruits, and how many Baskets of that fruit combination in my data source. 

cmbellah_0-1602869295089.png

 

Then I've created a slicer for one or more fruits which uses SEARCH to determine if that fruit type is present in the baskets - and filters the resutls on my map. PickedFruit is a measure which shows the selected fruit(s) from the slicer, and Fruit is the actual column. I can get the Fruit slicer to work on the map by adding it to the Time area in the Visualizations pane of the report. My issue is that I can't use PickedFruit instead of Fruits, so when I select a city that has the selected fruit in more than one type of basket, my city will have its total divided into all of the various Fruits lists. For my real work report that is a lot of pages and doesn't give the users a real total per city. 

cmbellah_2-1602869904423.png

Is there anything I can do to get just the substring PickedFruit so I'd get the total of all baskets that have apples in them? Thanks in advance - I'm a self-taught beginner here! 🙂

 

 

 

1 ACCEPTED SOLUTION

I am able to download the file, please let me know the output you want 

 

Baskets 3 = CALCULATE ( SUM(FruitBaskets[Baskets] ), ALL( FruitBaskets ))
Baskets 2 = 
var selValue = SELECTEDVALUE(Fruits[Fruit]) 
var t = if (ISFILTERED(Fruits[Fruit])
                      , CALCULATE( SUM( FruitBaskets[Baskets] ), ALLSELECTED(Fruits[Fruit]), ALLselected(FruitBaskets)) 
                      , CALCULATE( SUM( FruitBaskets[Baskets]), all(FruitBaskets) ))

return t 

 

 

Baskets 1 = CALCULATE( SUM(FruitBaskets[Baskets]), Filter (ALL(FruitBaskets[Fruits]), CONTAINSSTRING(FruitBaskets[Fruits], SELECTEDVALUE(Fruits[Fruit])) 
))

 

 

I added all three to the tooltip of the map, snapshot image looks as, when I selected the Apples:

sevenhills_0-1602886956430.png

 

 

View solution in original post

4 REPLIES 4
sevenhills
Super User
Super User

Thanks for your reply! I'd like to be able to have one total number of baskets by PickedFruit (instead of the Fruits column) displayed for each city on the map. The pbix file is in Google drive here .

cmbellah_0-1602872494005.png

 

I am able to download the file, please let me know the output you want 

 

Baskets 3 = CALCULATE ( SUM(FruitBaskets[Baskets] ), ALL( FruitBaskets ))
Baskets 2 = 
var selValue = SELECTEDVALUE(Fruits[Fruit]) 
var t = if (ISFILTERED(Fruits[Fruit])
                      , CALCULATE( SUM( FruitBaskets[Baskets] ), ALLSELECTED(Fruits[Fruit]), ALLselected(FruitBaskets)) 
                      , CALCULATE( SUM( FruitBaskets[Baskets]), all(FruitBaskets) ))

return t 

 

 

Baskets 1 = CALCULATE( SUM(FruitBaskets[Baskets]), Filter (ALL(FruitBaskets[Fruits]), CONTAINSSTRING(FruitBaskets[Fruits], SELECTEDVALUE(Fruits[Fruit])) 
))

 

 

I added all three to the tooltip of the map, snapshot image looks as, when I selected the Apples:

sevenhills_0-1602886956430.png

 

 

That's what I needed. Thank you so much!

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.