Showing posts with label sum. Show all posts
Showing posts with label sum. Show all posts

Monday, March 12, 2012

Report show difference between to weekly totals ?

Hi All,

I am very new to RS and i need to know how to do this kind of report.

1) Select the sum of each 7days between the dates entered by a user.

2) For sum col 1 and sum col 2 show a col with the + or - value

3) for sum col 3 and sum col 2 show the + or - vaule and so on.

So i think it would look like this

col1 col2 diff col3 diff col4 diff

100 50 -50 150 +50 75 -75

I really hope someone can help me with this and i really appreciate any help or guidence anyone can give

Kind regards

Dave C

You can use the group function in SQL to get the sum of the 7 days or you can also retrieve the week number and make a group using it. For the rest you can operate directly in the report like this: =ReportItems!A.Value - ReportItems!B.Value

I hope it helps

soanfu

Saturday, February 25, 2012

Report Server 2005 - How to SUM value by condition

hi, i need some help on this.

I create Matrix that show the sales and cancels of the sales department.

The TOTAL in the Matrix are fine, but i need to show also how many Sales

(param is bigger then 0) and how many cancels (param is negative, smaller the 0) each

sales man have in the Matrix report. i try to use IIF statement but it only return absolute number:
--
="Sales :" & (IIF(Fields!SalesCommission.Value<0, sum(Fields!SalesCommission.Value), 0)) &
"Cancels :" & (IIF(Fields!SalesCommission.Value>0, sum(Fields!SalesCommission.Value), 0)) &
"Total :" & IIF(sum(Fields!SalesCommission.Value)<0, "(" & Format(ABS(sum(Fields!SalesCommission.Value)),"F1") & ")" ,sum(Fields!SalesCommission.Value))
--

I think i will need to use Costum Code on this one.

anny advice ?

Thanks

It looks like your IF statements are backwards from what you want. Your output for your "Sales:" will return sum(Fields!SalesCommission.Value) when Fields!SalesCommission.Value is less then 0. Your output for your "Cancels:" will return sum(Fields!SalesCommission.Value) when Fields!SalesCommission.Value is greater then 0. This is because IIF( [EXPRESSION], [TRUE PART], [FALSE PART]). So it should look like:

="Sales :" & (IIF(Fields!SalesCommission.Value>0, sum(Fields!SalesCommission.Value), 0)) &
"Cancels :" & (IIF(Fields!SalesCommission.Value<0, sum(Fields!SalesCommission.Value), 0)) &

See what that does for you. Maybe I misunderstood/misread what you wanted for that part. Try and see what that does for you.

|||

Thanks, you are right, i replace the Sales and Cancels places.

I try your sample but again, the Matrix row have both Sales and Cancels in the Matrix TOTAL boxes and the EXPRESSION return the Total of the Sales O.K but the Total of the Cancels is 0 (zero).

What i need is to show in the MATRIX table the totals per salesman (Sales - (Minus) Cancels) and the clculatet Braek of

For exsaple:

Salse: 12.5

Cancels: -6.5

Total: 6

Anny Advice ?

|||So a "Cancels" is commision under 0 dollars. And a "Sales" is commission over 0 dollars. So you want to find how much commission total each sales person made? If I understand you correctly, all you need to do is sum(Fields!SalesCommission.Value) for your total. That should take care of everything. I hope this helps!

Report Server 2005 - How to SUM value by condition

hi, i need some help on this.

I create Matrix that show the sales and cancels of the sales department.

The TOTAL in the Matrix are fine, but i need to show also how many Sales

(param is bigger then 0) and how many cancels (param is negative, smaller the 0) each

sales man have in the Matrix report. i try to use IIF statement but it only return absolute number:
--
="Sales :" & (IIF(Fields!SalesCommission.Value<0, sum(Fields!SalesCommission.Value), 0)) &
"Cancels :" & (IIF(Fields!SalesCommission.Value>0, sum(Fields!SalesCommission.Value), 0)) &
"Total :" & IIF(sum(Fields!SalesCommission.Value)<0, "(" & Format(ABS(sum(Fields!SalesCommission.Value)),"F1") & ")" ,sum(Fields!SalesCommission.Value))
--

I think i will need to use Costum Code on this one.

anny advice ?

Thanks

It looks like your IF statements are backwards from what you want. Your output for your "Sales:" will return sum(Fields!SalesCommission.Value) when Fields!SalesCommission.Value is less then 0. Your output for your "Cancels:" will return sum(Fields!SalesCommission.Value) when Fields!SalesCommission.Value is greater then 0. This is because IIF( [EXPRESSION], [TRUE PART], [FALSE PART]). So it should look like:

="Sales :" & (IIF(Fields!SalesCommission.Value>0, sum(Fields!SalesCommission.Value), 0)) &
"Cancels :" & (IIF(Fields!SalesCommission.Value<0, sum(Fields!SalesCommission.Value), 0)) &

See what that does for you. Maybe I misunderstood/misread what you wanted for that part. Try and see what that does for you.

|||

Thanks, you are right, i replace the Sales and Cancels places.

I try your sample but again, the Matrix row have both Sales and Cancels in the Matrix TOTAL boxes and the EXPRESSION return the Total of the Sales O.K but the Total of the Cancels is 0 (zero).

What i need is to show in the MATRIX table the totals per salesman (Sales - (Minus) Cancels) and the clculatet Braek of

For exsaple:

Salse: 12.5

Cancels: -6.5

Total: 6

Anny Advice ?

|||So a "Cancels" is commision under 0 dollars. And a "Sales" is commission over 0 dollars. So you want to find how much commission total each sales person made? If I understand you correctly, all you need to do is sum(Fields!SalesCommission.Value) for your total. That should take care of everything. I hope this helps!