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

SSRS report to show the results of two datasets at different granularity on same report Expand / Collapse
Author
Message
Posted Sunday, March 10, 2013 9:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 19, 2014 3:49 AM
Points: 5, Visits: 55
I need to build a report to show the Top n products and sum of the rest products across column groups sales territory and year for my ProductSales Actual data set which contains the data at transactional day level granularity

I also need to show the total product Sales Actual and Total Product Sales Target across column groups sales territory and year.

The Product sales Target dataset is at sales territory and year granularity.



I guess we can impliment this with two different tables and align them .The first table grouped by top n and sum of others.The second table attached to a dataset which is at brought to common level granularity at territory and year

Is there any better way of doing this ,so that we achive this in a single table ,Also what is best way of acieving topn and sum of the rest of others .

Post #1428987
Posted Monday, March 11, 2013 8:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 26, 2013 8:14 AM
Points: 134, Visits: 165
If I understand everything correctly, then yes I think the best way to achieve is using two tables. That's because the two datasets are at different grains.

If you want to use one table, it may require a lot of t-sql jiu-jitsu. Personally, I would try using two tables first. If you can't get it to look good, then maybe go for Plan B.
Post #1429298
Posted Monday, March 11, 2013 9:17 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 7:46 AM
Points: 316, Visits: 1,487
Take a look at two articles written by Mike Davis over at BIDN.com. The articles contain steps for SSRS 2008, but I imagine they might work for 2005 as well as 2012.

http://www.bidn.com/blogs/mikedavis/ssis/172/top-n-bottom-n-grouping-in-ssrs-2008

Here's his follow-up article that also deals with handling "ties" (which he calls "duplicates") for Top N:

http://www.bidn.com/blogs/MikeDavis/ssis/1875/ssrs-top-n-and-bottom-n-reporting-with-duplicates

--Pete



Post #1429336
Posted Monday, March 11, 2013 1:32 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 19, 2014 3:49 AM
Points: 5, Visits: 55
Thank You for the responses,
Finally i was able to figure out using different group filtering and running aggregates.

Many Thanks
Chandu
Post #1429462
Posted Tuesday, March 12, 2013 7:29 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 26, 2013 8:14 AM
Points: 134, Visits: 165
I would like to see how you did that. Can you post the report and a sample dataset maybe?

thanks
Post #1429806
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse