SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Reporting services Group is not calculating by group.


Reporting services Group is not calculating by group.

Author
Message
adam spencer
adam spencer
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1364 Visits: 304
Hi,

Reporting services Group is not calculating by group.

=count(Fields!GMPI.Value) *900 for group column A gives the same total of $240,000 for all 3 groups, but =count(Fields!GMPI.Value) * 600 for group col B works corretly for each group having a different value.

any ideas, it is almost as if ssrs is glitching cuase the values in the field columns do not add up induvidually to 240,000.

thanks in advance
getoffmyfoot
getoffmyfoot
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1222 Visits: 412
The COUNT() expression function used in SSRS can actually receive a second parameter that specifies the group name that defines the scope the COUNT() should be calculated in.

The syntax would be roughly, COUNT(Fields!<field_name>, "<group_name>").

Try adding that to the misbehaving count and see if that corrects the report logic.
adam spencer
adam spencer
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1364 Visits: 304
Thanks so much. It was grouping them all by market, just that group header was choking. A fix that worked was doing the calculation at the data level in t-sql and not in the group header, although other columns were behaving fine with expressions in the group headers.



SELECT *, ISNULL(RAFScoreDataRap,0) * 900 AS RAFScoreDataRapCalc FROM @rptMatrixMetrics


SO now this above select at the end of the t-sql script in the SSRS data tab now multiplies by 900 at this level so in the layout just needs the new column alias we created above: RAFScoreDataRapCalc

Thanks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search