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
Eiji77
Helper II
Helper II

and or

 

無題.png

 

New GOAL = FILTER('Table 2',’Table 2'[STATUS]="D"||Table2'[STATUS]="E"&&RELATED('Table 1'[STATUS]<>"E")

Is this formula correct?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Eiji77

 

AND and OR are functions in the DAX, so maybe you can write it as follow: 

 

New Goal =
FILTER (
    Table2,
    AND (
        OR ( Table2[STATUS] = "D", Table2[STATUS] = "E" ),
        RELATED ( Table1[STATUS] ) <> "E"
    )
)

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@Eiji77

You can also use the following expression. It will produce the same result as the one I posted before:

 

New Goal2 =
CALCULATETABLE (
    Table2,
    OR ( Table2[STATUS] = "D", Table2[STATUS] = "E" ),
    Table1[STATUS] <> "E"
)

The filter arguments in CALCULATETABLE are always put in a logical AND condition.

Thank you @Anonymous !

I have one more question.

Can the AND and OR functions be used when there are three or more filter items?

In the case of this time, the goals are D, E, F etc.

Anonymous
Not applicable

@Eiji77

yes, you can use as many as you want, for example :

OR( OR(D, E), F) which equals to D || E|| F

 

For and as well,

 

AND(AND(D,E),F) which equals to D && E && F

 

but you have to take care of the combination of these two. 

@Anonymous

I understand! Thank you!

Hi @Eiji77,

 

Kindly mark the answer as solution to close the case please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@Eiji77

 

AND and OR are functions in the DAX, so maybe you can write it as follow: 

 

New Goal =
FILTER (
    Table2,
    AND (
        OR ( Table2[STATUS] = "D", Table2[STATUS] = "E" ),
        RELATED ( Table1[STATUS] ) <> "E"
    )
)

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.