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
Anonymous
Not applicable

Filter Common Names across 2 columns with a Disconnected Slicer - Problem

I have a problem that I feel like I'm getting closer to solving, but not quite. The goal is to have a single slicer, from a list of distinct managers that will filter a whole report based on if the person exists in EITHER of the columns. Using a variation of Curbals SelectedValue/AllSelected demo I arrived at the below almost solution that is showing me logically, in my 'New Measure' column what I want to see, but it's not filtering the table. I tried placing the measure in the filter area and it won't accept it (thinking I could set it to True). I tried a Custom Column with If logic and the column won't evaluate the TRUE.

How can I modify this to do what I need? I care nothing about the SUMIndex, was just a way to step into what I needed.

 

Any help would be GREATLY appreciated. 

 

2020-08-28_14-04-06.png

 

2020-08-28_14-14-14.png

1 ACCEPTED SOLUTION

Did you wrap your QUI expression in an IF() like this? If the condition is not met, it must be blank and filtered by the visual (if not other measures that return present results).

Return

IF(OR( ... ), 1, BLANK())

If this works for you, mark it as the solution. Praise is also appreciated. Please let me know if you don't.

Best regards

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Filters do react to Booleans (which is more than weird but this is what M$ have decided to do). Turn True to 1 and False to 0 and filter by these ints.
Anonymous
Not applicable

daxer - I convereted my or statement with an if statement and am still unable to add it as a filter. Can you elaborate a bit please?

 

2020-08-28_15-41-11.png

Did you wrap your QUI expression in an IF() like this? If the condition is not met, it must be blank and filtered by the visual (if not other measures that return present results).

Return

IF(OR( ... ), 1, BLANK())

If this works for you, mark it as the solution. Praise is also appreciated. Please let me know if you don't.

Best regards

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

It worked to filter the table, to which the measure was within... to add a couple more wrinkles... I'm still unable to drag it into the filter area... AND I still have several layers of Hierarchy to add to my report. I need to do the same type of filtering on Manager, Director, VP at minimum. I can handle making all of the measures to uniquely identify each subset of pairs of columns, for hierarchy title, but I definitely do not think it would be scalable if I had to have that measure in teh fields section of every visual. 

I think this would potentially work if I could have the individual title-measures, combined them together with an or Measure of the like somehow to where the slicers would follow if the director is filtered, AND.OR the Manager is filtered, etc.... only if I could tuck them away in the filter section for the page and not as a component of each visual. 

Any thoughts on how to scale this? Here's my final formula for the manager that you helped me solve. 

New Measure - Manager = 
VAR  SelectedValueVar = ALLSELECTED('Table (2)'[DistinctManagers])
return
IF(OR(
CALCULATE([SUMIndex],
FILTER('Table','Table'[Manager 1] IN SelectedValueVar))
,
CALCULATE([SUMIndex],
FILTER('Table','Table'[Manager 2] IN SelectedValueVar)))=TRUE(),1,BLANK())



Anonymous
Not applicable

You sir, are a genius. I had the OR, but had 0 rather than BLANK() as the false statement. Thank you!

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.