Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have the request to share a table visual for a department but they also want to track some consultants who are in another department. I understand that i can't simply filter the department in my visual filter since the consultants are in another department. I could simply filter on my visual all the employee from the department and also all the consultants, but the visual would no longer be dynamic, allowing the department's latest employees to always be displayed.
Is there a way i could make a DAX filter that allows me to filter a department and also filter some employee that are not in this department?
Thanks for the help
Solved! Go to Solution.
hi @WPastor ,
you can write a measure to filter the visual.
Not sure if i fully get you, supposing you have a data table like:
| Name | Department | Date |
| Amber | Sales | 12/1/2024 |
| Bob | Sales | 12/2/2024 |
| Candy | Marketing | 12/3/2024 |
| David | Marketing | 12/4/2024 |
| Ender | Operation | 12/5/2024 |
| Frank | Operation | 12/6/2024 |
| Greg | Operation | 12/7/2024 |
try to plot a visual with name column, pull a measure like below to the filter pane and choose 1:
FilterMeasure =
VAR _last =
MAXX(
TOPN(
1,
FILTER(
ALL(data),
data[Department] = MAX(data[Department])
),
data[Date]
),
data[Name]
)
VAR _result =
IF(
OR(
MAX(data[Department]) IN {"Sales"},
MAX(data[Name]) = _last
),
1,0
)
RETURN _result
it works like:
hi @WPastor ,
you can write a measure to filter the visual.
Not sure if i fully get you, supposing you have a data table like:
| Name | Department | Date |
| Amber | Sales | 12/1/2024 |
| Bob | Sales | 12/2/2024 |
| Candy | Marketing | 12/3/2024 |
| David | Marketing | 12/4/2024 |
| Ender | Operation | 12/5/2024 |
| Frank | Operation | 12/6/2024 |
| Greg | Operation | 12/7/2024 |
try to plot a visual with name column, pull a measure like below to the filter pane and choose 1:
FilterMeasure =
VAR _last =
MAXX(
TOPN(
1,
FILTER(
ALL(data),
data[Department] = MAX(data[Department])
),
data[Date]
),
data[Name]
)
VAR _result =
IF(
OR(
MAX(data[Department]) IN {"Sales"},
MAX(data[Name]) = _last
),
1,0
)
RETURN _result
it works like:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |