Forum

Greater than but le...
 
Notifications
Clear all

Greater than but less than statement

4 Posts
2 Users
0 Reactions
1,687 Views
(@naquin316)
Posts: 2
New Member
Topic starter
 

Hello fellow Excel users. I'm trying to use Power Query to run some calculations on some basic data. I have a column with "Total Hours" in whole number data type. I'm trying to create a conditional column from the following plain english statement:

If Total Hours is greater than or equal to 4 but less than 12 flag as true, otherwise flag as false.

I can't seem to get this to work in the add conditional column. As an added bonus I will be multiplying the true results by a column named "4-12hr Rate" with a value of $12.

If I could both of those issues into one step that would be great, but I think I have it worked out in my mind on how to multiply true results bt the 4-12hr rate column.

Any help would be greatly appreciated!

 

Thanks,

Ryan

 
Posted : 19/04/2018 5:14 pm
(@brucellyn)
Posts: 4
Active Member
 

Hi Ryan,

So in case [Total Hours] column has a value x, which 12>x>=4, would you like to multiply this value by 12? Did I get it right?

And in the opposite case, the test could just return the original value?

If it is the case, try this formula on custom column:

=if [Total Hours]>=4 and [Total Hours]<12 then [Total Hours]*12 else [Total Hours]

ex.:

 
Posted : 19/04/2018 8:05 pm
(@brucellyn)
Posts: 4
Active Member
 

total-hours.PNG

 
Posted : 19/04/2018 8:08 pm
(@naquin316)
Posts: 2
New Member
Topic starter
 

Awesome Carolyne!! That worked out perfectly!

Your help is greatly appreciated!

 

Ryan

 
Posted : 20/04/2018 1:53 pm
Share: