Revers running Value
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
November 20th, 2012 10:21am
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
Free Windows Admin Tool Kit Click here and download it now
November 21st, 2012 4:19am
Hi Thanks a lot that works.
November 21st, 2012 4:50am
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).aspx
Regards,Mike Yin
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
November 26th, 2012 3:30pm
Hi Mike,
thanks a lot, that was very helpful.
Regards
November 27th, 2012 12:07pm