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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.