cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
purnima13 Regular Visitor
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.
Please help !

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Dax expression- if two columns between certain number

Hi @purnima13

 

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"
)

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Dax expression- if two columns between certain number

Hi @purnima13

 

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"
)

View solution in original post

purnima13 Regular Visitor
Regular Visitor

Re: Dax expression- if two columns between certain number

@Zubair_Muhammad Thank you Smiley Happy

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

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

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

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.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

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

Users Online
Currently online: 140 members 1,797 guests
Please welcome our newest community members: