Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
patlopes
Frequent Visitor

Filter one column with reference to two other columns

Hi,

I have a table as sample below 

patlopes_0-1680881205838.png

 

I need to filter the table by Category when all Sub-Categories are Inactive. In the sample, after filtering, the table would only show Cat B. 

Is it possible with DAX ?

Thank you

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

you can also plot with the measure like below, maybe more intuitive:

FreemanZ_1-1680884001450.png

 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @patlopes 

please try

FilterMeasure =
INT (
ISEMPTY (
FILTER (
CALCULATETABLE (
VALUES ( 'Table'[Status] ),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[Category] )
),
'Table'[Status] = "Active"
)
)
)

FreemanZ
Super User
Super User

you can also plot with the measure like below, maybe more intuitive:

FreemanZ_1-1680884001450.png

 

FreemanZ
Super User
Super User

hi @patlopes 

try to plot a visual with Category and filter the visual with a measure like:

Measure = 
VAR _list= 
CONCATENATEX(
    VALUES(TableName[Status]), 
    TableName[Status]
)
RETURN
IF(
    _list = "Inactive",
    1, 0
)

it worked like:

FreemanZ_0-1680883845325.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.