This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
I need to write a Dax measure to use as a filter working in the background based on input from a slicer.
Another option would be to have two slicers, but I am afraid this would confuse the users.
I tried using the following:
Solved! Go to Solution.
Hi @evgeniam ,
I did these steps.
Is the slicer you want?
What columns did you add to the table?
Then, I tried to reconstruct your measure, but I didn’t quite understand the conditions in the formula:
MAX(RevenueDetail[Secondary Workgroup]) = Workgroup || ISBLANK(MAX(Revenue Detail[Secondary Workgroup]))
For example:
if [EmployeeID] = 2,
[Workgroup] = 12 || 14,
[Secondary Workgroup] = 12 || 14,
How do you want to compare these two values?
I created a measure like this:
Measure 4 =
VAR X =
CALCULATE(
MAX( [Workgroup]),
ALLEXCEPT(
Employee,
Employee[EmployeeID ]
)
)
VAR y =
CALCULATE(
MAX('Revenue Detail'[Secondary Workgroup]),
ALLEXCEPT(
'Revenue Detail',
'Revenue Detail'[EmployeeID]
)
)
RETURN
IF(
ISFILTERED(Employee[Workgroup]),
IF(
X = y || ISBLANK(y),
1,0
)
)
If it’s not true, please tell me more specific information and give me a sample data model.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @evgeniam ,
I did these steps.
Is the slicer you want?
What columns did you add to the table?
Then, I tried to reconstruct your measure, but I didn’t quite understand the conditions in the formula:
MAX(RevenueDetail[Secondary Workgroup]) = Workgroup || ISBLANK(MAX(Revenue Detail[Secondary Workgroup]))
For example:
if [EmployeeID] = 2,
[Workgroup] = 12 || 14,
[Secondary Workgroup] = 12 || 14,
How do you want to compare these two values?
I created a measure like this:
Measure 4 =
VAR X =
CALCULATE(
MAX( [Workgroup]),
ALLEXCEPT(
Employee,
Employee[EmployeeID ]
)
)
VAR y =
CALCULATE(
MAX('Revenue Detail'[Secondary Workgroup]),
ALLEXCEPT(
'Revenue Detail',
'Revenue Detail'[EmployeeID]
)
)
RETURN
IF(
ISFILTERED(Employee[Workgroup]),
IF(
X = y || ISBLANK(y),
1,0
)
)
If it’s not true, please tell me more specific information and give me a sample data model.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your time, @v-lionel-msft
I think your solution works as I ended up creating something similar.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 22 | |
| 21 | |
| 19 |
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 49 | |
| 25 | |
| 25 |