Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-08
2
Medium Priority
?
818 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
seenall earned 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

660 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