cancel
Showing results for
Did you mean:
Regular Visitor

## DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

Dear Experts,

In DAX i need to filter with condition account operation group (A & B) OR account operation group (C & D).

But, the codding doesn't seems working. Could you advise me how to fix this DAX codding? Many Thanks in Advance.

Measure = CALCULATE([USDAmount],FILTER(FILTER(Account, Account[AccountGroup]="A"|), FILTER('Operation Report','Operation Report'[OperationReportAccount]="B")) || FILTER(FILTER(Account, Account[AccountGroup]="C"|), FILTER('Operation Report','Operation Report'[OperationReportAccount]="C")).

Account group & operation report account are from differerent column & different table (1 from account, 1 from operation report).

Let me know if you have any idea on this.

Many thanks 😉

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

Hi @Hwang,

Based on my test, you could refer to below formula:

Sample data:

Create a calculated table:

`Table = CALCULATETABLE('Table1',FILTER(Table1,OR(Table1[AccountGroup]=41 && Table1[OperationReportAccount]=197,(Table1[AccountGroup]=47 && Table1[OperationReportAccount]=198))))`

Result:

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Highlighted
Solution Sage

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

Hi @Hwang

are you able to post a sample of your tables? thx

Proud to be a Datanaut!

Regular Visitor

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

@LivioLanzo Hi Livio, below is the table example.

I need to filter USDAmount column only for (Account Group= 41 - AND - Operation Report Account=197) OR (Account Group 47- AND- OperationReportAccount =198)

Please advise me the DAX coding. I have tried coding as per my prev. post but it doesn't work.

Thanks,

Super User I

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

@Hwang Please try to post the sample data in copiable format. I guess you are looking for subset of this table based on the filter criteria mentioned. Please try this as a "New Table"

`NewSubset = FILTER(TableName,OR((TableName[AccountGroup]=41 && TableName[OperationReportAccount]=197),(TableName[AccountGroup]=47 && TableName[OperationReportAccount]=198))`

Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !

Microsoft

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

Hi @Hwang,

Based on my test, you could refer to below formula:

Sample data:

Create a calculated table:

`Table = CALCULATETABLE('Table1',FILTER(Table1,OR(Table1[AccountGroup]=41 && Table1[OperationReportAccount]=197,(Table1[AccountGroup]=47 && Table1[OperationReportAccount]=198))))`

Result:

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Microsoft

## Re: DAX- Multi-Filtering criteria (A AND B) OR (C AND D)

Hi @Hwang,

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors