Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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