Dear All,
Please could you help, any help would be appreciated
I have a query, SotCpRating.
I want to create a rating field, based on an IIF statement.
There are 8 questions, named sequentially Q1,Q2,Q3 etc...
There is an overall score SCORE
The rating is calculated as follows...
If the SCORE<=15 and any of the questions Q1 to 8 <=5 then it get a 5 Rating.
If the SCORE<=20 and any of the questions Q1 to 8 <=10 then it get a 4 Rating.
If the SCORE<=30 and any of the questions Q1 to 8 <=10 then it get a 3 Rating.
If the SCORE<=40 and any of the questions Q1 to 8 <=15 then it get a 2 Rating.
If the SCORE<=50 and any of the questions Q1 to 8 <=20 then it get a 1 Rating.
If the SCORE>50 and any of the questions Q1 to 8 >20 then it get a 0 Rating.
This is where my problem shows its head
I have the current code:
As you can see I have only began the first rating (5)
It states
How do I check multiple fields within an IIF statement?
Any help would really be appreciated.
Thank you in advance!
Kind regards
Triacona
Please could you help, any help would be appreciated
I have a query, SotCpRating.
I want to create a rating field, based on an IIF statement.
There are 8 questions, named sequentially Q1,Q2,Q3 etc...
There is an overall score SCORE
The rating is calculated as follows...
If the SCORE<=15 and any of the questions Q1 to 8 <=5 then it get a 5 Rating.
If the SCORE<=20 and any of the questions Q1 to 8 <=10 then it get a 4 Rating.
If the SCORE<=30 and any of the questions Q1 to 8 <=10 then it get a 3 Rating.
If the SCORE<=40 and any of the questions Q1 to 8 <=15 then it get a 2 Rating.
If the SCORE<=50 and any of the questions Q1 to 8 <=20 then it get a 1 Rating.
If the SCORE>50 and any of the questions Q1 to 8 >20 then it get a 0 Rating.
This is where my problem shows its head
I have the current code:
Code:
Rating:iif([Q1],[Q2],[Q3],[Q4]<=5,iif([SCORE]<=15,5))
It states
Am I doing this right?I have the wrong number of arguments.
How do I check multiple fields within an IIF statement?
Any help would really be appreciated.
Thank you in advance!
Kind regards
Triacona