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)

PJFggVYiSJeyga9XPgaY_example.png

Btw, excuse me for my bad english ;(
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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
 
Upvote 0
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"
 
Upvote 0
could you post representative example which reflect structure and type of data in Excel file which also contain expected result?
 
Upvote 0

Forum statistics

Threads
1,223,774
Messages
6,174,456
Members
452,566
Latest member
Bonnie_bb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top