Solved

Need to SUM the MIN() of Rows in a Matrix in SSRS 2008.

Posted on 2010-09-08
2
806 Views
Last Modified: 2012-08-14
Experts:

I need to SUM the MIN() AMOUNT field wthin a row of data that is pulled into SSRS 2008. I have a Matrix and need the CODE that will tell the ROW CELL to Summarize the MIN of an Amount_Field because due to the report requirement, I have numerous rows of duplicated Amounts by ORDER_ID. I need to first of all tell the matrix to pick the MIN and then summarize all the MINS.

Currently my Amount Summary is way over-stated because of the duplicates.

0
Comment
Question by:MIKE
2 Comments
 
LVL 3

Accepted Solution

by:
seenall earned 500 total points
ID: 33631697
Not sure I understand what aspect of code you refer to (Report Expressions etc)

But from an SQL Perspective - OLAP windowing comes into its own for this question, if I understand it correctly



select  sum(res.amount_field) amount_summary

from (

select order_id

     , amount_field

     , rank() over 

       (partition by order_id order by amount_field) ranked_amount

  from matrix_table

) res

where res.ranked_amount = 1

Open in new window

0
 
LVL 17

Author Comment

by:MIKE
ID: 34418116
Actually, I need the SSRS "Expression" formula to do this within SSRS....

I"m using a Matrix
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS Problems 9 57
How to read BOM (Byte Order Mark) from csv file. 4 36
Upgrading SQL Server Management Tools 7 36
SSRS Dynamic Column Names - Last 8 Weeks 3 5
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now