x
login about faq Site discussion (meta-askssc)

change background color in ssrs

i do have a section and subsection in a groups, each section might have multiple subsections and i am performing avg on each subsection at report level. I want to change the back color for the subsection which will get minimum average score. While i am performing at backcolor expression like

= iif(min(avg(score)) < avg(score),'blue','white') ...it is giving an error....

EDIT (Error from comments on Cyborg answer)
[rsAggregateofAggregate] The Value expression for the textrun 'Order_Count9.Paragraphs[0].TextRuns[0]' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.

more ▼

asked Oct 12 '11 at 01:13 AM in Default

Murali gravatar image

Murali
896 64 100 117

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

did you tried iif(min(avg(score)) < avg(score),"blue","white")..?

more ▼

answered Oct 12 '11 at 01:35 AM

Cyborg gravatar image

Cyborg
10.2k 29 39 44

yes, but still same error...

Oct 12 '11 at 03:24 AM Murali

I guess you cannot use nested aggregates in SSRS min(avg(score)), can you post the error in detail?

Oct 12 '11 at 03:28 AM Cyborg

[rsAggregateofAggregate] The Value expression for the textrun 'Order_Count9.Paragraphs[0].TextRuns[0]' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.

Oct 12 '11 at 07:07 AM Murali

Murali, the error message clearly says that you cannot nest the aggregate function. IS it possible to bring that Avg(Score) to separate column and then do aggregate on the new column, ie MIN(of New column)

Oct 12 '11 at 08:51 PM Cyborg
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x486

asked: Oct 12 '11 at 01:13 AM

Seen: 732 times

Last Updated: Nov 03 '11 at 01:52 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.