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
BJM1
Regular Visitor

Conditionals with multiple matches

Apologies in advance - I am just starting out using Power BI.

 

In my dataset, I have a column that contains tags to categorize my data in different ways.  I am using a conditional column to pull out some tags for category 1 (i.e. size), but for category 2 (i.e. deployment), I expect to have multiple assignments matching for each row.   I'd like to add a slicer to my visualizations to allow selection by each item individually (i.e. not by permutations/groups of tags).  Is this possible?  If so, how?

Oh2muPglyf.png

 

5 REPLIES 5
v-eqin-msft
Community Support
Community Support

Hi @BJM1 ,

 

Since you want a dynamic output based on a slicer, I suggest you create measure instead.

Measure = IF( CONTAINSSTRING(MAX('Table'[Tag]),SELECTEDVALUE('Citrus Fruit'[Citrus Fruit])),1,0)

Then apply it to filter pane, set as "=1" like this:

selection.PNG

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-eqin-msft ,

Your suggestion is very helpful.  Could you suggest a query/function to cleanse the values out of the Tags column so that only the values assigned in table Citrus Fruit remain?  I'm hoping for some solution that is based on the values I want to keep because I don't control the values that are added as tags.  I would like to only display the ones that match the Citrus Fruit listing.  

 

Thanks!

 

v-eqin-msft
Community Support
Community Support

Hi @BJM1 ,

 

Sorry for that the information you have provided is not making the problem clear to me...

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-eqin-msft,

Sorry for being unclear.  Here is some example data:

BJM1_0-1619027159743.png

 

I'd like to be able to apply a slicer such as the following:

 

Citrus Fruit

  • Grapefruit
  • Orange
  • Lime
  • Lemon
  • Tangerine

So, when any one of the citrus fruit options is selected, all those rows that include the value are displayed.  For example, selecting Lemon returns Georgia and Florida.  Is there a way to use another conditional column to do this? 

 

Thanks,

 

**I wasn't able to upload my data as a real table.  The webform kept generating an error about unsupported HTML, so I've uploaded a screen shot of it instead.  

BJM1_1-1619027359183.png

 

amitchandak
Super User
Super User

@BJM1 , Not very clear. But if you want slicer not to take input from others , stop interactions

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

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.