Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Percentage from two Recordsets

Status
Not open for further replies.

skw8966

Programmer
Apr 12, 2001
59
US
I’m trying to get a calculation from two columns each with its own recordset.

Calculation needed in first cell of Mc Percentage:

(76-108)/108 = -29.63%

76 is from the Recordset (Wk) and 108 is from the recordset (PvsWk). Both recordsets pull from Crosstab queries in MS Access.

I haven’t had much luck doing this calculation within a query, so I was hoping to do it in the ASP.

Any help would be greatly appreciated.

Thanks,

 
What am I missing? This seems simple...

newVal = (rsWk(num1) - rsPvsWk(num2)) / rsPvsWk(num2)

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top