Al, i'm with you so far. In the fashion you descibe, I have two rows for
each company showing a sum of each status. ie
company x firm order 10
company x quoted 20
company y quoted 3
company z firm order 16
company z quoted 30
However I'd already achieved this by simply having two broker columns, one
of which counts criteria "quoted" or "firm order"
So how do I do the maths on two adjacent rows where in some instances like
company y, there is no row for firm orders?
I thought I would need to produce a column for each of quoted/firm order on
a single row.
Not sure what you mean about re-posting - i just click 'reply' button and
type....should I paste in the prior posts?
Anyway, thanks for looking again!
Lance,
In your email configuration there should be an option to "Include message
in reply". That will show my previous post, and your reply... so we can see
the "flow" of the conversation. In Outlook Express, it's in
Tools/Options/Send...
This is what you wrote originally...
>>What I'd like to do is have a Query using QBE grid which has columns for:
>>Group by Broker. Count Status Where "Firm order" Or "Quoted"
>>and have a second column next to it showing Where Status "Firm Order"
>>only.
>>...and then do a division between the two to get a fraction.
This is not what you asked for...
> company x firm order 10
> company x quoted 20
> company y quoted 3
> company z firm order 16
> company z quoted 30
Where's the BrokerName field?
Why are you now showing/grouping on Company?
Shouldn't the Firm Order caption read Firm Orders and Quoted?
If you want help with a problem, you must setup the problem clearly, and
stay with that setup throughout the process.
1. First, if some calculations come up with null or 0, and a ratio can not
be calculated, filter those records out of the query. Use Not IsNull or
<>0... or whatever you need to get those 0/Null recs out of there.
2. According to what you originally asked for (above), I would have this...
(Email wrapping may cause columns to misalign.. bear with me)
Broker Company Firm&Quoted Quoted Ratio
B Smith ABC Co. 10 20 .50
XYZ Co. 15 20
.75
J Jones ABC Co. 6 18 .33
HHH Co. 7 10
.70
etc etc...
hth
Al Camp
> Al, i'm with you so far. In the fashion you descibe, I have two rows for
> each company showing a sum of each status. ie
[quoted text clipped - 21 lines]
>
> Anyway, thanks for looking again!
lance carter - 19 May 2005 11:16 GMT
Email options: Correctly setup, just doesn't apply to my browser it seems.
I've mixed up the word company name and broker name. it's the same thing -
different broking companies selected from a drop down.
if I use logical operater AND it returns nothing because status is either
one or the other, not both at the same time.
Your table:
Broker Company Firm&Quoted Quoted Ratio
B Smith ABC Co. 10 20 .50
XYZ Co. 15 20
.75
J Jones ABC Co. 6 18 .33
HHH Co. 7 10
.70
Is exactly what I'm looking for, just the broker/company name is same thing.
I think i'd better buy a few books and study up as I am clearly missing
some of the more fundamental facts...like does each new column in the QBE
filter out for the next column. if I could stop it doing this, I would
already know how to deal with my problem. Or if I could apend query tables
by column instead of by row, that would help too.
Well thanks for trying Al!
lance carter - 19 May 2005 14:34 GMT
Al, I've cracked it. I've manged to use your forumula and get it
working..then applied a ratio. phew. Many thanks.
Al Camp - 19 May 2005 16:16 GMT
Good deal Lance...
The ratio calculation just divides the two Firm/Quote vs Quote calculations,
and divides them.
Al Camp
> Al, I've cracked it. I've manged to use your forumula and get it
> working..then applied a ratio. phew. Many thanks.