Avatar of Naitik Gamit
Naitik Gamit
Flag for India asked on

Sum Of Group In SSRS Report

I have data like

target   Achieve
10            5
20            10
30            20

I want to sum in group as (5/10)+(10/20)+(20/30).
when I am summing it give as  5+10+20/10+20+30 .
Please provide me solution.
SSRSDB Reporting Tools

Avatar of undefined
Last Comment
Naitik Gamit

8/22/2022 - Mon
Arifhusen Ansari

Could you please provide the expect output ??

It's not clear from your question.
Naitik Gamit

ASKER
Hi,Arif

In my report I have column group A,B,C,D......Report look as

                       
                A      B      C      D
 target    10    20   30   40

Achieve   5      15   10    20

I want Sum(Achieve/target).................. but individually I mean 5/10+15/20 etc
when I write sUM(Fields!ACHIVEMENT.Value)/sUM(Fields!target.Value) it gives result of 5+15+10+20/10+20+30+40
Guy Hengel [angelIII / a3]

 write it likr this
SUM(Fields!ACHIVEMENT.Value/Fields!target.Value) 
Your help has saved me hundreds of hours of internet surfing.
fblack61
Naitik Gamit

ASKER
Guy Hengel [angelIII / a3]

It show same result.... as 5+15+10+20/10+20+30+40  not as (5/10)+(15/20)..
Arifhusen Ansari

Are you using matrix?
Naitik Gamit

ASKER
No I am using tabular report and have column group..
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Arifhusen Ansari

Can you please post the screen shot of your report?
Naitik Gamit

ASKER
tst.png
As per image I want sum of 0.5+0+1.33+2 in red colour textbox.
Guy Hengel [angelIII / a3]

The 0 should be 1, but that apart...
Do you have an expression for that total line already? If yes use that one
You may also need to define scope
https://msdn.microsoft.com/en-us/library/dd255256.aspx
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Arifhusen Ansari

Use the same expression as you have used in text box in green back ground.

Refer the screen shot.
2016-07-22_12-46-44.png
Naitik Gamit

ASKER
Guy Hengel [angelIII / a3] I am using expression as , sUM(Fields!ACHIVEMENT.Value)/sUM(Fields!target.Value) I am trying to give column group scope but it gives me error...can you please provide me example.
Naitik Gamit

ASKER
Arif I  already use it but it gives all total not individually .......... it gives me result of 17/14 = 1.21 but I want 0.5+1+1.33+2=4.83
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Arifhusen Ansari

Hi,

I have attache the screen shot and the sample rdl as well.

Please have a look.
Report5.rdl
2016-07-22_13-13-09.png
Naitik Gamit

ASKER
Arif it working only for sum , if we are doing division it show wrong result
ASKER CERTIFIED SOLUTION
Arifhusen Ansari

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Naitik Gamit

ASKER
How to declare Reportvariable1 ?? and where ?? I cant find
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Arifhusen Ansari

In report property you can declare the variable.

Refer the screenshot.

2016-07-22_15-45-38.png
Naitik Gamit

ASKER
Arif I am solving problem in sql so, thanks for your solution.............

can u help me to sum at group level.....I am trying as  Sum(Fields!WEIGHTAGE_ACHIVEMENT.Value,"Group_Name") but it gives error.