Need Help with a Monarch Formula
I am looking for a simple Monarch formula which returns the number of values within a set of values that is greater or less that a given values.
For example a formula which counts how many values in the set of numbers, as below, which are GT or EQ 1.5
(1.0, 1.5, 1.9, 1.4, 0.8)
Answer = 2
Note: The values will be numeric data fields
Best Answer
-
One solution would be to use multiple if statements:
if(col1>=1.5,1,0)+
if(col2>=1.5,1,0)+
if(col3>=1.5,1,0)If the value is GTE 1.5 then return "1" else "0" and then add those values together.
0
Answers
-
In the example you provided above, would those values be:
- on the same row but in separate columns
- on the same row and in the same column
- single row each and one value in one column?
0 -
Thanks for your reply...
The values will be
- on the same row but in separate columns
Thanks
0 -
One solution would be to use multiple if statements:
if(col1>=1.5,1,0)+
if(col2>=1.5,1,0)+
if(col3>=1.5,1,0)If the value is GTE 1.5 then return "1" else "0" and then add those values together.
0 -
Yes... I was trying to get around the "If" statements. OK... I need a quick fix, so I will try this approach.
Thanks
0 -
Thanks Chris... This worked well for my requirement. My final formula is:
If([02-Monday1Z]>1.50 .And. [02-Monday1Z]<=1.75,1,0)+
If([03-Tuesday1Z]>1.50 .And. [03-Tuesday1Z]<=1.75,1,0)+
If([04-WednesdayZ]>1.50 .And. [04-WednesdayZ]<=1.75,1,0)+
If([05-Thursday1Z]>1.50 .And. [05-Thursday1Z]<=1.75,1,0)+
If([06-Friday1Z]>1.50 .And. [06-Friday1Z]<=1.75,1,0)
0