Difference between revisions of "How do I format while trying to Average?"
From SmartWiki
m (How do I format while using aggregation? moved to How do I format while trying to Average?: More appropriate title) |
|||
Line 1: | Line 1: | ||
'''Q: How do I format while trying to Average? | '''Q: How do I format while trying to Average? | ||
− | ''A: <nowiki>format(AVG(if([this]='criteria',[this],0)), | + | ''A: <nowiki>format(AVG(if([this]='criteria',[this],0)),num))</nowiki> |
+ | where num = integer indicating scale of the decimal number. | ||
'''Why do we do this? | '''Why do we do this? | ||
− | '' | + | '' To calculate average of values with decimal numbers, above syntax can be used to apply the formatting.'' |
+ | |||
+ | '''Where can this be applied? | ||
+ | |||
+ | '' Calculated field'' section in [[Reports]] | ||
[[Category:FAQ]][[Category:Reports]] | [[Category:FAQ]][[Category:Reports]] |
Revision as of 09:49, 25 March 2009
Q: How do I format while trying to Average?
A: format(AVG(if([this]='criteria',[this],0)),num))
where num = integer indicating scale of the decimal number.
Why do we do this?
To calculate average of values with decimal numbers, above syntax can be used to apply the formatting.
Where can this be applied?
Calculated field section in Reports