cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Prequery Variable

Former Member
0 Kudos

Hi ,

I have to calculate based on the result of ConsUnit /TaxProvison for each Consunit:

Ex: Cons Unit / Tax Provison

2000 $1,151.60

4000 $46,648,458.24

4036 0

4113 0

5000 $77.15

5002 0

-


Result $46,649,686.99

I should calculate a column like this $46,649,686.99 /$1,151.60

$46,649,686.99 / $46,648,458.24

$46,649,686.99/0

$46,649,686.99/0

etc.......................

I tried using a prequery and got the results of Consunit by Account number . I mean totals like $46,649,686.99 in a prequery in a column. Now I don't understand how I can use this in my existing query to calculate the column like this $46,649,686.99 /$1,151.60

$46,649,686.99 / $46,648,458.24

$46,649,686.99/0

$46,649,686.99/0

I created a replacement path type variable on Account Number that has the results of the prequery.

Can anyone help me with a solution please?

Thanks

Prasad

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, no need to go for prequery. Create formula in your query and use SUMGT <Operand> / Value.

Regards,

Former Member
0 Kudos

I have my data like this:

FisYr/Per 2/2009 3/2009 4/2009 5/2009 6/2009 7/2009

AccountNumber ConsUnit T11 T19 T11 T19 T11 T19 T11 T19 T11 T19 T11 T19

2204000 2000 $633 $764 $767 $876 $798 $897 $987 $76 $76 $56 $8767 $767

4000 $76 $243 $75 $23 $86 $786 $77 $675 $76 $34 $34 $97

result $1342 $1007 $842 $899 884 .........................................................

2204100 2000 $70 ..............................................................................................

4113 $30.................................................................................................

result $100 ................................................................................................

I ahve amny account numbers and many company codes. I tried SUMCT but it didnt seem to work.

I need 2 columns that calculate result/cell with Consunit and T11 data and again for T19

Ex: I need 2 columns that will calculate $1342/$633 $1007/$764

$1342/$76 $1007/$243

..................................................

$100/$70 $...........

$100/$30 $...............

Can any one please help me with this. How to accomplish this in query designer?

Thanks

Prasad

Former Member
0 Kudos

Can any one please help me with a solution?

former_member188975
Active Contributor
0 Kudos

Not sure that a prequery can help you here. I think you can try using one of the formula operators: SUMCT or SUMGT to get a column that contains the Totals value for Tax Provision, and then use this and the original column (KF) to do the calculation you need.

Hope this helps...