DataSet Question-Please Help

N

Nikki

I need to compare the count of an amount of matches in one column to a match
of a dataset in 2 columns- An example is best:
Column 1 Column 2 Result
2 1 1
2 1 1
2 1 1
2 1 1
3 4 blank
3 5 blank

So in looking at column 1 and 2 if the count of column 1 equals the count of
column 1 and 2 matching then the new column equals column 2. If the count of
column 1 and the count of column 1 and 2 matching is not equal the new column
is blank.
I am willing to go a few steps to do it. Any ideas would be appreciated!
Thanks,
Nikki
 
G

geebee

hi,

In your query, include any columns you want to, but you could add a column
to the query which features an IIf statement to get the values you are
mentioning. Here is an example for modeling:

IIf([num2]=[num3],[num2],IIf([num2]>[num3],[num3],Null)) AS newcolumn


hope this helps,
geebee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top