Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Average in ssrs 2008 Expand / Collapse
Author
Message
Posted Tuesday, November 13, 2012 12:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, September 15, 2013 8:35 PM
Points: 3, Visits: 54
Hi,

I want to find the average in my text box.i have my code(conversion) in my report properties(custom code) where i calculate my years,months and days.im my database i have this suppose 1 year= 365

x y z
365 test1 Ken

for X= 365 i want to find the average. i try =avg(Fields!items.value) still give me 365.

thanks in advance.
Post #1384257
Posted Tuesday, November 13, 2012 11:51 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:42 PM
Points: 13,239, Visits: 11,018
You have only 1 row. How are you supposed to find an average that is not 365?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1384405
Posted Wednesday, November 14, 2012 12:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, September 15, 2013 8:35 PM
Points: 3, Visits: 54
hi Koen Verbeeck

i have multiple rows this is and example as mention above.
Post #1384812
Posted Wednesday, November 14, 2012 2:07 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 1:42 PM
Points: 13,239, Visits: 11,018
uttar (11/14/2012)
hi Koen Verbeeck

i have multiple rows this is and example as mention above.


I only see 1 row in your example.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1384852
Posted Thursday, November 15, 2012 6:47 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, January 16, 2013 4:23 PM
Points: 415, Visits: 2,333
uttar (11/13/2012)
Hi,

I want to find the average in my text box.i have my code(conversion) in my report properties(custom code) where i calculate my years,months and days.im my database i have this suppose 1 year= 365

x y z
365 test1 Ken

for X= 365 i want to find the average. i try =avg(Fields!items.value) still give me 365.

thanks in advance.


I gave your formula =avg(Fields!items.value) and it seemed to work. Did you make sure to put this formula in a parent group? You can't use aggregates unless you also use groupings. For example, I right clicked on the column I wanted to average, and selected "add total". This adds a row that you can use to put aggregates on the whole table. It defaulted to adding a "sum" but I simply changed it to "avg" on the column and it worked.

Post #1385134
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse