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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.