Is there a way to round to 2 decimals in a query-of-query on an avg statement? I could not find a system function in the adobe docs.
Asked
Active
Viewed 730 times
2 Answers
4
Not in QoQ, no. The full docs for QoQ are here: "Query of Queries user guide". That includes the entirety of QoQ's functionality.
You're just gonna have to do the rounding when you're using the recordset.
It might be worth raising a ticket on the bug tracker to get an enhancement for this: https://bugbase.adobe.com/. It's functionality I've needed in the past.

Adam Cameron
- 29,677
- 4
- 37
- 78
-
Thanks, will open a feature request for it, seems like a logical addition for future versions. – Marius Jan 31 '14 at 13:19
1
I needed to do a similar thing to use the QoQ result in a chart. I ended up using the QuerySetCell to format the QoQ column.
In the example code below, qryResult was my QoQ query name and MWDPCT was the column that I wanted to reformat.
<cfloop query="qryResult">
<cfset temp = QuerySetCell(qryResult,"MWDPCT", decimalFormat(qryResult.MWDPCT),currentrow)>
</cfloop>
Hope that helps a bit.

Carlos M
- 11
- 1