Maggie Barr
Board Regular
- Joined
- Jan 28, 2014
- Messages
- 188
Hello, and thank you in advance if you can help,
I am trying to create a new column in a query based on two fields, PROTOCOL TYPE & DURATION MINUTES. After much online searching trying to find help with syntax and trying multiple types of formulas, I am at a loss. In my most recent attempt, in the "builder" for the new column I am putting:
ADJUSTED_DURATION_MIN: If PROTOCOL TYPE = "Historical" Then 1
ElseIf PROTOCOL TYPE = "Incidental" Then 1
ElseIf DURATION MINUTES >240 Then 240
Else DURATION MINUTES
Below is a description of what I am trying to do:
The column I want to create is ADJUSTED_DURATION_MIN
Then if PROTOCOL TYPE = "Historical" OR "Incidental" make ADJUSTED_DURATION_MIN 1
As well, If DURATION MINUTES is greater than 240 make ADJUSTED_DURATION_MIN 240
Otherwise make ADJUSTED_DURATION_MIN = DURATION MINUTES
I am new to Access and trying to do as much in Access because doing it all in Power Query, which is where I will end of for analyses purposes, was choking the program and taking WAY to long to perform tasks.
Any advice would be appreciated!
Thank you,
Maggie
I am trying to create a new column in a query based on two fields, PROTOCOL TYPE & DURATION MINUTES. After much online searching trying to find help with syntax and trying multiple types of formulas, I am at a loss. In my most recent attempt, in the "builder" for the new column I am putting:
ADJUSTED_DURATION_MIN: If PROTOCOL TYPE = "Historical" Then 1
ElseIf PROTOCOL TYPE = "Incidental" Then 1
ElseIf DURATION MINUTES >240 Then 240
Else DURATION MINUTES
Below is a description of what I am trying to do:
The column I want to create is ADJUSTED_DURATION_MIN
Then if PROTOCOL TYPE = "Historical" OR "Incidental" make ADJUSTED_DURATION_MIN 1
As well, If DURATION MINUTES is greater than 240 make ADJUSTED_DURATION_MIN 240
Otherwise make ADJUSTED_DURATION_MIN = DURATION MINUTES
I am new to Access and trying to do as much in Access because doing it all in Power Query, which is where I will end of for analyses purposes, was choking the program and taking WAY to long to perform tasks.
Any advice would be appreciated!
Thank you,
Maggie