Count the number of values in a range that are not defined in a list - excel-2007

I have a table that contains details of all of our companies mobile phones. Next to this table, I need some basic stats like how many handsets of each OS there are.
Using COUNTIF I can work it all out, apart from Other. Is there a way of calculating the number of values that do not equal anything in a list of values?
This works for just 'not Android' -
=COUNTIF(Mobiles[OS], "<>Android")
But this does not work when trying to exclude all the major players -
=COUNTIF(Mobiles[OS], AND("<>Android", "<>BlackBerry", "<>iOS", "<>Windows"))
Does anybody know how I can achieve this? Thanks.

This works, it's just not very clever
=COUNTIFS(Mobile[OS],"<>Android",Mobile[OS],"<>Blackberry", Mobile[OS],"<>iOS",Mobile[OS],"<>Windows",)

Don’t count Other, instead count All and subtract Specific (as derived from COUNTIF).

Related

Pandas Value Counts With Constraint For More Than One Occurance

Working with the Wine Review Data from Kaggle here. I am able to return the number of occurrences by variety using value_counts()
However, I am trying to find a quick way to limit the results to varieties and their counts where there is more than one occurrence.
Trying df.loc[df['variety'].value_counts()>1].value_counts()
and df['variety'].loc[df['variety'].value_counts()>1].value_counts()
both return errors.
The results can be turned into a DataFrame and the constraint added there, but something tells me that there is a way more elegant way to achieve this.
#wen ansered this in the comments.
df['variety'].value_counts().loc[lambda x : x>1]

Filter on Count Aggregation

I have been looking for the solution on the internet from quite a while and I'm still not sure that if it is possible on Kibana or not.
Suppose I apply filter on term and it gives me count of the respective terms but I want the results to show only those terms where count equals a specific value.
Being more specific,
I want to find out the number of tills which are the most busy (most number of transactions). Currently when I apply a filter on term and count it shows me the all the tills with their respective transaction count. What I want is that to show only those tills where the count is equal to let's say 10.
In other words a similar functionality like HAVING clause in relational dbms.
I have found a lot of work arounds of the same usecase but I'm looking for a solution.
I hope I understand what you're asking. I think You can search the field in question with proper parameters. For example, for the field 'field_name' with more than 10 hits, try following Lucene query:
field_name:(*) AND count:[10 TO *]
For the exact result of field_name with count=10, query:
field_name:(*) AND count:[10]
Let me know if this was what you were looking for!

IF and conditional SUM in Google Doc Spreadsheet

I am trying to run an IF statement in Google Spreadsheet that will, if "Yes" SUM a series of values.
=IF(G3="Yes",=SUM(C3*D3)+(E3*D3))
This works (if I ignore the IF) and just do =SUM(C3*D3)+(E3*D3), so I know my math is correct.
I have read a few different posts that are asking similar questions, but many have "guesses" and are offering different structured formulas, so I'm not really even sure what the proper structure is any more.
Basically, for the nerdy portion of you, the spreadsheet does the following:
If the "killed" column is Yes, I need to calculate the XP of the monsters killed.
Base XP (C3) times Qty (D3), plus Bonus XP (E3) times Qty (D3) and them SUM the value.
The equal sign (=) in front of SUM should not be there. If your formula works I guess Google Docs just ignores it. Also, the function SUM() is useful to add the values from a range of cells from the same row or column when you don't know in advance how many cells you will add (or there are more than 2 cells and you use SUM() because it's less to write).
If I understood your request, the formula you need is:
=IF(G3="Yes",C3*D3+E3*D3)
Right now the SUM function is only wrapping C3*D3 then you are adding (E3*D3). This is the same as (C3*D3)+(E3*D3) not using the SUM function. Order of operations tells us there is no need for the parentheses so you could write C3*D3+E3*D3.
The IF function has the following parameters:
IF(EVALUATION,IF TRUE,IF FALSE)
So your final equation would be:
=IF(G3="YES",C3*D3+E3*D3,"")
I always add the FALSE return to be blank so that if I need to change it later I can do so.

SQL (MS) - Custom compare for Null=Value on many columns

I have a table with 50 columns of identifying information that is inconsistently filled out, even for the same individual. Sadly, individuals do not have a unique identifier in this system.
For example, some times we may capture a person's middle name, preferred name, and sometimes it is null - for the SAME individual.
Simplest solution I could think of would be a custom compare function that takes (NULL,VALUE) and returns true, but I'm not sure how to implement this, or if it's even wise.
Ideally I would like to link up records with a lag over partition, but there is frustratingly little information on how partition works other than it takes a 'value expression'. I have tested that it can accept multiple comma separated columns, but the occurrence of null values causes us to miss matches.

First time MapReduce: I need to combine a distinct and count, please help

I have a collection and need to get a distinct count from the data set in MongoDB
db['2011-05-29'].distinct("plugins.HTTPServer.string");
returns all the distinct names for the key
How would I go about getting a count for every occurrence of a particular string?
Example:
Apache 29172
IIS 3932
I've looked at some MapReduce examples but can't seem to get it to work right. As my counts add up to more than the actual items in the collection.
db['2011-04-13-1pm-scan'].distinct("plugins.HTTPServer.string").length;
returns the number of distinct items in that key.
I however want the Key Value and Count for each, as above.
Your question is 100% exactly what the wordcount demo application does.
It's part of the standard set of examples shipped with Hadoop and it's also explained here in great detail in these pages
http://wiki.apache.org/hadoop/WordCount
http://developer.yahoo.com/hadoop/tutorial/module4.html#wordcount
HTH