473,234 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,234 software developers and data experts.

Please explain how IIF Function works (was Access Help)

Can anyone tell me wht this expression does in ACCESS

IIf([Count]>1,([SumOfQty]-[Max])/([Count]-1),[Average]) AS ExcludeOutlierAvg

I Encountered this in a query

I do not Understand [COUNT], [Average] mean

Also in
[SumOfQty], SumOfQty is a field in the table I am trying to access.

Thanx in advance
Sep 1 '07 #1
2 2220
missinglinq
3,532 Expert 2GB
[Count], [SumOfQty], [Max] and [Average] are all field names.

The general syntax is IIf(expression, truepart, falsepart)
If the expression evaluates to True then you do/use the truepart
If the expression evaluates to Flase then you do/use the falsepart

IIf([Count]>1 means
If Count is greater than 1 then
[SumOfQty]-[Max]) / ([Count]-1) AS ExcludeOutlierAvg

If Count is equal to or less than 1 then
[Average] AS ExcludeOutlierAvg

Please remember to provide a meaningful Title for any threads you start! This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions. It is difficult for the experts to answer questions when there is not enough details provided to understand the problem.

Please take the time to read the Posting Guidelines, paying particular attention to Give a clear title to your question.

Linq ;0)>
Sep 1 '07 #2
I am sorry abt the title .... but actually my q is more on database terms

my query is

Expand|Select|Wrap|Line Numbers
  1. SELECT BulkActivity_Max_Min_SubQuery_01.OrderDetail.Item AS Item, Count(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Count], Sum(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS SumOfQty, Max(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Max], Min(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Min], Avg(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS Average, Import_table_for_Planner.units_sold_per_day
  2. FROM BulkActivity_Max_Min_SubQuery_01 INNER JOIN Import_table_for_Planner ON BulkActivity_Max_Min_SubQuery_01.Item = Import_table_for_Planner.Item
  3. GROUP BY BulkActivity_Max_Min_SubQuery_01.OrderDetail.Item, Import_table_for_Planner.units_sold_per_day;
  4.  
check the part

Max(BulkActivity_Max_Min_SubQuery_01.SumOfQty) AS [Max]

is this like a array thing???

because there is a group by.

Could u explain this plz
Sep 1 '07 #3

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

Similar topics

2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
9
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
1
by: Terrance | last post by:
Hello, I was wondering if someone can help me understand something. Below is some code that I got from the MS website that is suppose to authenticate for the username and password on the local...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
by: Kermitus | last post by:
Hey I was hoping for a little help. I am a Domain reseller for Aplus.net. The problem is they really don't provide an API to automate Domain searches, registering etc... I see much potential in...
2
by: garyusenet | last post by:
I could do with something similiar, can you tell me if you think this would work for me, and if there's any advantage in working with controls this way than how I currently am. At the moment...
9
by: colin.mcnulty | last post by:
Hi, I'm a SQL Server DBA, but I guess that won't buy me any friends round here huh? ;-) I've been asked to look at the SQL that's being executed on a DB2 database from a web app, specifically...
5
by: =?Utf-8?B?TWljaGFlbA==?= | last post by:
Hello, I am in serious need of help. I have an ASP.NET application written in C#. I have a page that processes a file on the web server. The page uses a class I created and stored in the AppCode...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.