Log in  ::  Register  ::  Not logged in

 Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Running Total (sum according to a criteria) Rate Topic Display Mode Topic Options
Author
 Message
 Posted Monday, December 10, 2012 1:33 PM
 SSC Rookie Group: General Forum Members Last Login: Tuesday, July 23, 2013 8:34 AM Points: 27, Visits: 39
 I'm trying to summarize the Total amount according to the type of paycode (IncomeCode, BenefitCode).. The IncomeCodes starts with 1 (110, 146 in my example) and the BenefitCodes starts with 5 (540, 560). Here is an example of my dataEmployee Code Total120000 540 \$75.00120000 560 \$10.00120000 110 \$1200.00120000 146 \$45.00 120000 723 \$70.00380000 765 \$56.00380000 110 \$985.00380000 540 \$60.00380000 146 \$15.00I need to setup 2 RunningTotal, one adding up amount for IncomeCode (RunningIncome), the other one for Benefit Codes (RunningBenefit)The result of my function should beEmployee RunningIncome RunningBenefit120000 \$1245.00 (code 110 + 146) \$85.00 (code 540 + 560)380000 \$1000.00 (code 110 + 146) \$60.00 (code 540 + 560 none in this case)As an example, in Crystal report, the formula achieving the RunningIncome is setup as belowCalculate the sum of the Total field only when the value of Code is one of (110, 146), then reset RunningTotal for each Employee How can I achieve this in SSRS? The RunningValue function does not seem to be flexible enough to sum according to a criteria (summarize only for code 110 and 146)I thought of filtering the codes needed (only getting the IncomeCodes) in the data source query but my problem is that I need to have the other codes in the report as well for my other running total (RunningBenefit)Any help would be greatly appreciated.
Post #1394770

 Permissions

 Copyright © 2002-2016 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.