Information générale
Catégorie:
Gestionnaire de rapports & Rapports
Scott,
I do a lot of this. One reason is that I need averages of all row-values where the column had an entry, not average of all values including the 0-entry rows. (Average length of hospital stay for a certian diagnosis.) I have averages over the small group, larger group, and grand totals.
Anyways, use report variables. (Reports | Variables)
Variable nSumOfCount, Value to store: Count, Calculate Sum
Variable nSumOfDays, Value to store: NumberOfDays, Calculate Sum
Then in your report,
Report expression: IIF(nSumOfDays > 0, nSumOfCount/nSumOfDays, 0)
Calculations: Nothing
Print When: nSumOfDays > 0, Repeated Values = Yes
This will give you blanks where there were no days, or you can skip the Print When and have zeroes, or change the expression to IIF(..., STR(...), "None")
>Is there a way to put a formula as a subtotal / total in a report column?
>
>
>here it what i want:
>
>
> count number of days average count per day
> 10 2 5
> 8 3 2.6
> 1000 1 1000
>total 1018 6 169.69
>
>notice the total of average count per day is the total of count / total of number of days
>
>thanks
>
>scott
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement