Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

summing value based on group ssrs

Status
Not open for further replies.

k1ngTMO

MIS
Aug 25, 2010
2
US
I have two datasets where I pull date from for this report...dataset1 has sales by month and trans dataset has trans spend.

I want to include sales in the location groupings but only sales for that location....right now it seems to sum up all the sales even though I put it inside the location group...

how do I do that...do I use a iif function??
 
i think I need something like this...
=iif(First(Fields!group.Value, "DataSet1") like Fields!group.Value, Sum(Fields!JAN.Value, "DataSet1"),0)

but this returns no value...
 
Best bet is to do this in your query - ssrs doesn;tlike trying to put data from 2 datasets in 1 table...

Other than that, there are 2 issues with your syntax:

1: Don't think you can use "like" in a formula\

2: 0 and Sum(Fields!JAN.Value, "DataSet1") must be the same format otherwise you get an aggregation error. Whenever trying to do something like that, you need to use:

cdbl(Sum(Fields!JAN.Value, "DataSet1")),cdbl(0))


Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top