Solved

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

Posted on 2010-09-08
2
801 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

21 Experts available now in Live!

Get 1:1 Help Now