Monday, March 19, 2012

Add values of distinct rows

Hello All,

I have a scenario wherein I wanted to add the values of distinct transaction number, how do I do that. i.e.

Financial organisation (GROUP (Company))

12/31/2003 606.60 approved 123 (Transaction Number) (1st Row)

5643577(Wok Report) (2nd Row)

01/05/2004 1000.00 approved 124 (Transaction Number) (to Satisfy $1000 three work reports were raised)

5643500(Wok Report)

5643501(Wok Report)

5643502(Wok Report)

02/05/2004 2000.00 approved 125 (Transaction Number) (to Satisfy $2000 three work reports were raised)

5643300(Wok Report)

5643301(Wok Report)

5643302(Wok Report)

Total 3606.60 (Total per Company group)

I want to add the visible row values only. Because the 1000.00 and 2000.00 was repeating for 01/05/2004 and 02/05/04 I am hinding the repeated values.

Please help me completing the above task.

Thanks,

Deepak Vodethela

Deekpak,

Unfortunatley, from my experiences, this is not possible as of SSRS 2005. I tried to do the same thing recently and I ended up changing my SQL to give me what I wanted.

|||

Thanks for the reply Todd. Can't we write a custom function to do the needful i.e. which has to check for the distict Transaction number and pick up the value and do the sum by group. I am not an expert at SSRS but just curious.

To change my query it will be a very big task. Right now I am joining 11 tables to get the required fields and if I want to add the sum on a group then it'll be a laborious task.

Any help would be appriciated.

No comments:

Post a Comment