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
adx14
New Member

Filtering on Multi-Values/Tags

I have a table of tags for products that I am using to categorize the products. A product might have a bunch of tags. I'm plotting the quantities of the products in a treemap by tag. The problem I have is that when you filter on one tag with a slicer, the treemap no longer shows all the other tags that products with that tag have.

 

The example below matches the data structure I have. In the example, I have Animals with quantities, and tags for the animals. If I filter on the Mammal tag, I want to see the breakdown of Vegetarian, HasTrunk, etc. in the treemap Instead, I just get Mammal=52 (Elephants + Horses + Rabbits). 

 

I think I need to recast the data to have all the possible combinations of tags and filter on that combination set, but I am not sure the best way to go about doing this. 

 

Animals

IDNameQuantity
1Elephant30
2Horse2
3Fish10
4Rabbit20

 

Tags

Tag
Mammal
Reptile
Gray
Green
Vegetarian
FourLegs
Gills
HasTrunk

 

AnimalTags

AnimalIdTag
1Mammal
1Gray
1HasTrunk
1FourLegs
2Mammal
2Vegetarian
2FourLegs
3Gills
4FourLegs
4Mammal
4Vegetarian

 

I have a relationship 1-Many Animals[Id] - AnimalTags[AnimalId] and 1-Many Tags[Tag] - AnimalTags[Tag].

 

Thank You! 

 

2 REPLIES 2
amitchandak
Super User
Super User

@adx14 , change the join of Animals to AnimalTags as Many to Many and filter direction from AnimalTags to Animal and try

Hi-

 

Thanks for this! I gave it a try but it doesn't seem to be doing what I want. Here's the sample file with the data: https://1drv.ms/u/s!As_KtLaSMEMCit0FDcgZToDjg_sa2g?e=9u9xaf

 

What I'm hoping for is if you pick Mammal in the slicer, you should still see the breakdown in the Tree Map of the other tags where they are associated with a mammal.

 

Thanks!

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

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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