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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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