Create column with conditional

LINUS_MAASTOK

New Member
Joined
Oct 25, 2019
Messages
11
I everyone, im new in power bi / power query and I need to know how to create a column in a table IF the value of a specific column is between a range of one of two different column values.

Something like: create a column 4 where the value is the same as the value in column 1 IF this value is + -5% of the value in column 2 OR it is + -5% of the value in column 3

Example:
IF(
( (table[column1]) < table[column7]*1.05 ) AND (table[column1]) > table[column7]*0.95 )
OR
((table[column1]) < table[column8]*1.05 ) AND (table[column1]) > table[column8]*0.95 ) ) )
THEN table[column1] (**or the value of any other column)


Btw, excuse me for my bad english ;(
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
301
Office Version
2016
Platform
Windows
Hi how about something like this:
=if(or(and(c1<c7*1,05; c1>c7*0,95); and(c1<c8*1,05;c1>c8*0,95));c1;"")

c1 = column 1 address
c7 = column 7 address
c8 = column 8 address

(sry on phone, check back later)

I hope this helps!

John
 

LINUS_MAASTOK

New Member
Joined
Oct 25, 2019
Messages
11
i have an issue... the table that im using is a Merge of 2 other tables, so it doesnt leave me create a column ; "A cyclic reference was encountered during evaluation"
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
5,075
could you post representative example which reflect structure and type of data in Excel file which also contain expected result?
 

Watch MrExcel Video

Forum statistics

Threads
1,096,119
Messages
5,448,416
Members
405,510
Latest member
Carlos Cruz

This Week's Hot Topics

Top