Matrix with Variance Column
Hi folks, I have a matrix with the follow format ProductName 2011 2012 Product 1 4322 4432 Product 2 3233 4323 I need to insert a new column to show the variance between this columns like bellow: ProductName 2011 2012 Var Product 1 4322 4432 1,26% Product 2 3233 4323 14,43% Im having some headeach to do it, someone have any idea to solve it? (The variation is like: SUM(2012-2011)/SUM(2011+2012 values) I'm have alread read the link http://www.simple-talk.com/sql/reporting-services/advanced-matrix-reporting-techniques/ this sample is similar but not equal my scenario and the differences turn the application of this sample invalid for my scenario. Thanks to all!
October 9th, 2012 10:46am

Hi folks, I have a matrix with the follow format ProductName 2011 2012 Product 1 4322 4432 Product 2 3233 4323 I need to insert a new column to show the variance between this columns like bellow: ProductName 2011 2012 Var Product 1 4322 4432 1,26% Product 2 3233 4323 14,43% Im having some headeach to do it, someone have any idea to solve it? (The variation is like: SUM(2012-2011)/SUM(2011+2012 values) I'm have alread read the link http://www.simple-talk.com/sql/reporting-services/advanced-matrix-reporting-techniques/ this sample is similar but not equal my scenario and the differences turn the application of this sample invalid for my scenario. Thanks to all! Hi guys, I found a solution. I created the follow VB function in Report Body and called them on report cell Public Function GetGrowthValue(ByVal PreviousValue, ByVal CurrentValue) As Object If IsNothing(PreviousValue) OR IsNothing(CurrentValue) Then Return Nothing Else if PreviousValue = 0 OR CurrentValue = 0 Then Return Nothing Else Return (CurrentValue - PreviousValue) / (CurrentValue + PreviousValue) End If End Function
Free Windows Admin Tool Kit Click here and download it now
October 9th, 2012 2:51pm

Hi gcardoso, I am glad to hear that you have resolved the issue by yourself. Thanks very much for your useful sharing. Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.Mike Yin TechNet Community Support
October 13th, 2012 2:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics