Author |
Topic |
friend.vasu
Starting Member
5 Posts |
Posted - 2013-04-26 : 07:13:24
|
i have one matrix with JAN to DEC . i want get (Current Month)- (Previous Month) after the month. columns?can any body please please please help me. i am trying from morning on wards.sreee |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-26 : 07:32:05
|
whats your backend query?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
friend.vasu
Starting Member
5 Posts |
Posted - 2013-04-26 : 07:33:55
|
eventhough its SSAS MDX query. now i want to do in SSRS. Please help.quote: Originally posted by visakh16 whats your backend query?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
sreee |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-26 : 07:41:59
|
oh...MDX? just makes it that more difficultSSRS only way you can do is to make use of ReportItems collection and do likeReportItems!CurrentValueTextbox.value - ReportItems!PreviousValuetestboxid.value------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
friend.vasu
Starting Member
5 Posts |
Posted - 2013-04-26 : 07:45:55
|
i can use reportitems. I have to use in columns and it contains JAN to DEC. now i want find difference between april and march only.quote: Originally posted by visakh16 oh...MDX? just makes it that more difficultSSRS only way you can do is to make use of ReportItems collection and do likeReportItems!CurrentValueTextbox.value - ReportItems!PreviousValuetestboxid.value------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
sreee |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-26 : 07:59:12
|
you can or you cant? reportitems will have all the columns inside the container------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
friend.vasu
Starting Member
5 Posts |
Posted - 2013-04-26 : 08:02:13
|
i cannot use reportitems. Becuase, current month value will change dynamically. ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs[/quote]sreee |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-26 : 08:26:24
|
the only other way is to drop the result from MDX onto a table and then do previous month calculation. Then in your report use a sql query to take it from table which is populated by the MDX------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-26 : 08:30:45
|
If you've control over source cube, you could also write custom calculations to do the calculation of previous month values using LAG function------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
friend.vasu
Starting Member
5 Posts |
Posted - 2013-04-26 : 08:44:28
|
Normally LAG function works for static data. but in My case month has to be change dynamically.quote: Originally posted by visakh16 If you've control over source cube, you could also write custom calculations to do the calculation of previous month values using LAG function------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
sreee |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-29 : 01:02:57
|
quote: Originally posted by friend.vasu Normally LAG function works for static data. but in My case month has to be change dynamically.quote: Originally posted by visakh16 If you've control over source cube, you could also write custom calculations to do the calculation of previous month values using LAG function------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
sreee
hmm...do you mean you need to go different number of months back eachtime?if your concren is months change then you could simply define your set asSUM([Time].[Month].CURRENTMEMBER,[Measures].[YourMeasureField])-SUM([Time].[Month].CURRENTMEMBER.LAG(-1),[Measures].[YourMeasureField])and create a memebr for above calculation------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|