By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 748 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Maybe IIF, I don't know!!!!!

Presto731
P: 53
I have a table that monitors employees performance on 10 different categories. For each category they receive a percentage. Each range of percentages is assigned a number.

For example. If for category 1 they have 85% their score would be x. So 0-19% is one pint, 20-29% is 2 points, so on down the line to 100%. each category has different ranges and point values.

I have never had to write such large IIF statement for each column of a query. Not even sure if thats the route I need to take.

Suffice it to say I want to have a query off this table that spits out each employess point total for each category.

I will take any and all suggestions. let me know if you need more info.

Please help, I have deadlines to meet :D

Thannk you in advance.
Feb 4 '08 #1
Share this Question
Share on Google+
3 Replies


jaxjagfan
Expert 100+
P: 254
I have a table that monitors employees performance on 10 different categories. For each category they receive a percentage. Each range of percentages is assigned a number.

For example. If for category 1 they have 85% their score would be x. So 0-19% is one pint, 20-29% is 2 points, so on down the line to 100%. each category has different ranges and point values.

I have never had to write such large IIF statement for each column of a query. Not even sure if thats the route I need to take.

Suffice it to say I want to have a query off this table that spits out each employess point total for each category.

I will take any and all suggestions. let me know if you need more info.

Please help, I have deadlines to meet :D

Thannk you in advance.
Are all 10 categories evenly weighted? Does each count for 10% of the total possible? It would not hurt to add a "Weight" column to your "categories" table.
When the employee receives a score for a category divide the score by the category weight.

If an employee received an 85 for category1 and category1 weight is 10 then employee score would be 8.5 (85/10). You could adjust weights (some may be more important than others) but just make sure the total weight equals 100.

I think you were making it harder than it needs to be.
Feb 4 '08 #2

Presto731
P: 53
The categories are weighted and are reflected in the amount of points they get within each range, each percentage range is also different for each category.
Feb 4 '08 #3

jaxjagfan
Expert 100+
P: 254
The categories are weighted and are reflected in the amount of points they get within each range, each percentage range is also different for each category.
If you divide score by weight you don't need a range.

85 would fall into your range of 80-90. 8 or 9 points depending on you set that range. My method gives them a score of 8.5. You can use the Round function to round the score to the nearest whole number.

Using your method you would need a points table with CategoryID, RngLow, RngHigh, Points columns. (This would be easier than maintaining a bunch of "IIF" statements in a query). You would need to write your query to lookup points based on something similar to this:
Expand|Select|Wrap|Line Numbers
  1. Select Points
  2. From "yourjoined tables"
  3. Where EmployeeScore Between RngLow and RndHigh AND EmpCategoryID = CategoryID
  4.  
Feb 4 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.