Revers running Value
-
Tuesday, November 20, 2012 3:21 PM
Hello Together,
I have a problem with a matrix in reporting services.
A part of the report should be shown in this way
1.207.652
3.386.227
2.178.575
4.665.096
1.278.869
5.877.298
1.212.202
8.156.765
2.279.467
10.388.556
2.231.791
12.674.522
2.285.966
for better understanding: 3.386.227 - 1.207.652=2.178.575, etc
My problem is to get the numbers in the white column group.
I tried with running value but I did not got it.
Thanks JO_MO
All Replies
-
Wednesday, November 21, 2012 9:19 AMAnswerer
Hi,
Try this
Step 1:
Create a dataset
SELECT CAST('1207.652' AS NUMERIC(18,3)) A, '0.000' B
UNION ALL
SELECT CAST('3386.227' AS NUMERIC(18,3)) A, '2178.575' B
UNION ALL
SELECT CAST('4665.096' AS NUMERIC(18,3)) A, '1278.869' B
UNION ALL
SELECT CAST('5877.298' AS NUMERIC(18,3)) A, '1212.202' B
UNION ALL
SELECT CAST('8156.765' AS NUMERIC(18,3)) A, '2279.467' B
UNION ALL
SELECT CAST('10388.556' AS NUMERIC(18,3)) A, '2231.791' B
UNION ALL
SELECT CAST( '12674.522' AS DECIMAL(18,3)) A, '2285.966' B
Step 2:
Assign created dataset to Tablix
Step 3:
Enter "=Fields!A.Value-Previous(Fields!A.Value)" in the Tablix Textbox expression
Rajesh Jonnalagadda http://www.ggktech.com
- Proposed As Answer by Hasham NiazEditor Wednesday, November 21, 2012 9:44 AM
- Marked As Answer by JO_MO Wednesday, November 21, 2012 9:49 AM
-
Wednesday, November 21, 2012 9:50 AM
Hi Thanks a lot that works.
-
Monday, November 26, 2012 12:30 PMModerator
Hi JO_MO,
Here is more information about the Previous() function. In Reporting Services, the Previous() function returns the value of the expression for the previous row of data. Its syntax is as follows:
Previous(expression, scope)
The Previous function returns the previous value for the expression evaluated in the specified scope after all sorting and filtering have been applied. If expression contains an aggregate function that uses a default scope, Previous aggregates the data within the previous instance of the scope specified in the aggregate function call. If expression contains an aggregate function that specifies a scope other than the default, the scope parameter for the Previous function must be a containing scope for the scope specified in the aggregate function call.
Reference:
http://msdn.microsoft.com/en-us/library/ms156372(v=sql.100).aspxRegards,
Mike Yin
TechNet Community Support- Marked As Answer by JO_MO Tuesday, November 27, 2012 9:06 AM
-
Tuesday, November 27, 2012 9:07 AM


