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 ;(
 

CsJHUN

Active Member
Joined
Jan 13, 2015
Messages
271
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
3,239
could you post representative example which reflect structure and type of data in Excel file which also contain expected result?
 

Forum statistics

Threads
1,077,937
Messages
5,337,291
Members
399,138
Latest member
eurogator

Some videos you may like

This Week's Hot Topics

Top