Make trend button
Hi guys/girls, I have made a table that containes Job data like costs, until now. For this table, I would like to add a kind of trend button. This trend button shows the green, orange or red image, when the costs of ONE MONTH ago are (for instance) lower, the same, or higher. How do I do this? First I was thinking I had to make an extra dataset that contains the fields I wnat to use. Second, I had to set a filter on this dataset that is some like 'today minus one month'. Are my thoughts right? If so: How can I make the filter 'today minus one month'. If not, how can I do this? Thanks for so far!
May 10th, 2012 10:38am

Hi There If you are using the SQL Server 2008 then you can add indicator and put expression in the incator for red and green condition. For example if you are selecting the data based on parameter the bring the data for current month as well as current month -1 You could write something like this inside your dataset where [Financial Month] between( @_Month-1) and (@_Month) And in the indicator put expression like this =iif(Sum(Fields!Rev_Ytd_Actual_prevmonth.Value) < Sum(Fields! Rev_Ytd_Actual_Actualmonth.Value),"red","green"). I am putting sceenshot for you help Many thanks Syed Qazafi Anjum --indicator exp =iif(Sum(Fields!Rev_Ytd_Actual_prevmonth.Value) < Sum(Fields! Rev_Ytd_Actual_Actualmonth.Value),"red","green"). -- put where clause something like this where [Financial Month] between( @_Month-1) and (@_Month)
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2012 10:57am

Hi THensbroek, From your case history, I notice that you may use SQL Server 2008 Reporting Services or later version. To achieve your goal, as Syed posted above, you can add the Indicator control to your table. Based on your scenario, you can the indicator value to an expression like: =Fields!Costs.Value - Previous(Fields!Costs.Value) Then, set the States Measurement Unit to Numeric and organize the indicator states as the screenshot showing below: Reference: Indicators Hope this helps. Regards, Mike Yin
May 13th, 2012 11:00pm

Thanks guys! But what I don't understand is how I can set a filter on one specific field like Cust Usage. Can I make two fields like this? : - Cost_Usage_Current - Cost_Usage_PreviousMonth If this is posible I want to compare these fields. What I don't get is how I can compare the fields based on a date filter....
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 3:27am

Hi There It depend on your query design if you would like you can bring two column one with this month data and one with previous month data and you can compare them easily for example if the two column are Cost_Usage_Current, Cost_Usage_PreviousMonth then you can easily compare them by putting expression If Fields!Cost_Usage_Current.Value < Fields!Cost_Usage_PreviousMonth.Value But if you are bringing data in one field and also bringing data for months Then refer to example above by Mike you can put expression like Mike has done above =Fields!Costs.Value - Previous(Fields!Costs.Value) as previous will get the value of previous row If you have any question please let me know. Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
May 16th, 2012 5:34am

Hi Syed, Thanks again!! In the end, I indeed want to compare the fields like If Fields!Cost_Usage_Current.Value < Fields!Cost_Usage_PreviousMonth.Value I know the function Previous, but when i use this one, I get the data from the previous row, but I actually want the data from the previous MONTH. Is this posible in any way or do i have to make another dataset? Isnt there a function that sets a filter on a field like (Fields!Cost_Usage, [Today - 1 month]) ? Sorry if some questions are a little stupid, but I just can't figure it out...
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2012 6:06am

Hi there You do not need to have another dataset what you could do you pass the current month as a parameter and you can create two column one with current month of data and one with previous month data For example Your where clause [Financial Month] =( @_Month-1) for previous month you can use [Financial Month] =(@_Month) for current month data I am assuming that [Financial Month] is your column inside database while @_Month is your parameter I hope this will help. You can create temporary table with two columns put data inside your temporary table and bring data from temporary tables columns. I hope you understand If you have any question please let me know. Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
May 16th, 2012 6:29am

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

Other recent topics Other recent topics