cancel
Showing results for
Did you mean:
Regular Visitor

## Dax expression- if two columns between certain number

Hi all,

What I basically want to do is clasify a row as valid or invalid if

Column A is between values 5 and 6

Column B is between values -3 and -4 (beware of the negative numbers)

Row_Type = if(('04 GD'[Column A] >=5 ||  '04 GD'[Column A] <=6 )&&  ('04 GD'[Column B]<= -3 || '04 GD'[Column B]>= -4 ),"Valid","Invaid")

There is a logical mistake which I am not able to figure out.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: Dax expression- if two columns between certain number

Replace OR with AND

```Row_Type=
IF (
'04 GD'[Column A] >= 5
&& '04 GD'[Column A] <= 6
&& '04 GD'[Column B] <= -3
&& '04 GD'[Column B] >= -4,
"Valid",
"Invaid"
)```
2 REPLIES 2
Super User

## Re: Dax expression- if two columns between certain number

Replace OR with AND

```Row_Type=
IF (
'04 GD'[Column A] >= 5
&& '04 GD'[Column A] <= 6
&& '04 GD'[Column B] <= -3
&& '04 GD'[Column B] >= -4,
"Valid",
"Invaid"
)```
Regular Visitor

## Re: Dax expression- if two columns between certain number

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 140 members 1,797 guests
Recent signins: