cancel
Showing results for 
Search instead for 
Did you mean: 
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
Eyelyn9
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 @Eyelyn9 ,

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!

 

Eyelyn9
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 @Eyelyn9,

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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.