Creating a Range Formula
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Good Afternoon Alteryx Community,
I am trying to use some sort of formula to determine if the outcome of a follow-up is within our target range. I will show you the data and then explain what I am trying to do further.
Last | Age IOL Impl (yr) | > 1-2yrs Sph |
1 | 2.4 | 0.5 |
2 | 3.5 | -1.5 |
3 | 4.6 | 1.5 |
4 | 5.5 | 0 |
5 | 6.4 | -2.5 |
6 | 7.5 | -2 |
7 | 7.3 | 0.5 |
8 | 4.3 | -0.5 |
9 | 8.2 | 2.5 |
10 | 9.1 | 1.5 |
11 | 10.4 | 1 |
12 | 11 | 0.5 |
13 | 12.6 | 1 |
14 | 13.7 | 0.75 |
15 | 14.4 | -3 |
16 | 15.8 | 1.5 |
17 | 16.4 | -1 |
18 | 17.3 | 0.25 |
19 | 18.7 | 0 |
20 | 19.3 | 0.5 |
Okay, So we have 2 different targets:
1) for children under age 8, our target is with -2 to +2
2) for children over age 8, our target is -1.50 to +1.50
Next, I want to know the number within the target and number outside the target (in each age cohort + total). Plus, I want to know the percent within the target range (in each age cohort + total).
I am lost as to where to start, I have been making unbelievable progress with your help and I recently showed one of your healthcare sales engineers all the work and he was extremely impressed with the progress in 2 weeks... which I explained to him was largely because of the forums help.
Anyway, if you could please provide a workspace so I can see all the formulas and save them for future use I would greatly greatly appreciate it.
Thank you again in advance and if you have any questions please feel free to ask,
Nick
Solved! Go to Solution.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What you're looking for is a simple if statement. All available functions are HERE.
if
[Age IOL Impl (yr)]<8 and [> 1-2yrs Sph]>-2 and [> 1-2yrs Sph]<2 then "In Target"
elseif
[Age IOL Impl (yr)]<8 then "Out of Target"
elseif
[Age IOL Impl (yr)]>8 and [> 1-2yrs Sph]>-1.5 and [> 1-2yrs Sph]<1.5 then "In Target"
else "Out of Target"
endif
after that a summarize tool will get you there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Faronnj ,
Attached is an example workflow showing how to accomplish what you need.
LEt me know if that works for you.
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @Faronnj,
Does this look ok for you?
I added the count per group (<8 or >8 and taking into account the other parameter) also added the percents:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
![](/skins/images/1AD6617C767659D8A9F9801BEDFCFB20/responsive_peak/images/icon_anonymous_message.png)