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.
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.
Solved! Go to 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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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?
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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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())
You sir, are a genius. I had the OR, but had 0 rather than BLANK() as the false statement. Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
69 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |