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) |
|||
(9 intermediate revisions by 3 users not shown) | |||
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]='</nowiki>''criteria''<nowiki>',[this],0)),</nowiki>''num''))'' | ||
+ | |||
+ | where: | ||
+ | criteria = [[:Category:Criteria|criteria]] set by author of report and | ||
+ | num = integer indicating scale of the decimal number | ||
− | '''Why do we do this? | + | '''Why do we do this?''' |
− | '' | + | To display the result of ''average'' with specified number of digits after decimal, above syntax can be used to apply the formatting.'' |
+ | |||
+ | '''Where can this be applied?''' | ||
+ | |||
+ | ''[[Calculated Field]]'' section in [[:Category:Reports|reports]]. | ||
[[Category:FAQ]][[Category:Reports]] | [[Category:FAQ]][[Category:Reports]] |
Latest revision as of 09:54, 30 April 2013
Q: How do I format while trying to Average?
A: format(AVG(if([this]='criteria',[this],0)),num))
where: criteria = criteria set by author of report and num = integer indicating scale of the decimal number
Why do we do this?
To display the result of average with specified number of digits after decimal, above syntax can be used to apply the formatting.
Where can this be applied?
Calculated Field section in reports.