Creating charts that represent current year in Months in order to show YTD performance by month
I continue to struggle with what, to me, seem to be the simplest things in SSRS. I have spent over two days trying desperately to get a chart to properly show the quantities of Manufacturing Orders that we have made each month, Year To Date.
Below is the closest I’ve been able to come and the axis is still off by one month and not in sync at all with my data.
Then when I run the report for other part numbers, that only have MO’s in say two months (Jan & Jun), they don’t even behave scalar and I get the following screwed up mess. Notice the two columns have decided to fill most of the scale and they
did not skip the four months between Jan and Jun and they also are completely out of sync with my scalar x-axis!
My goal is to create a chart that can be run for any part number on any day and show how many times it has been built during the current calender year. Chart should always show months of current year starting Jan on left and ending with Dec on
right (even if I am running report in February for example). Then for each month that we have data, it should show the QTY on the column chart and leave blank columns for months with no data.
Can anyone help me with this?
Chris
Hi Chirs,
From your desription, you want to createa a chart to show all the months on the chart no matter it has data on that month or not, rigth? If in this case, we can create an other dataset to show all the month, and then use the lookup function to get the month
QTY. The steps below are for you reference.
Create an other dataset use the query below.
DECLARE @TMP TABLE (Month nvarchar(20),QTY INT)
INSERT @TMP SELECT 'Jan',0
INSERT @TMP SELECT 'Feb',0
INSERT @TMP SELECT 'Mar',0
INSERT @TMP SELECT 'Apr',0
INSERT @TMP SELECT 'Mat',0
INSERT @TMP SELECT 'Jun',0
INSERT @TMP SELECT 'Jul',0
INSERT @TMP SELECT 'Aug',0
INSERT @TMP SELECT 'Sep',0
INSERT @TMP SELECT 'Oct',0
INSERT @TMP SELECT 'Nov',0
INSERT @TMP SELECT 'Dec',0
SELECT * FROM @TMP
Drag [Month] filed to Category Groups and drag [QTY] field to Values.
Then change the of [QTY] to:
=Lookup(Fields!Month.Value,Fields!Month.Value,Fields!QTY.Value,"DataSet1")
The report looks liek below.
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support
Similar Messages
-
Line Chart to Compare Current Year vs Last Year
I am on BI 7 SP9. I need to create a line chart that shows 2 lines to compare revenue for the current year against last year. The first line should show the revenue for the current year. The second line should show the revenue for last year. In my BEx query, I have the fiscal period values in the row and the revenue key figure in the column. Questions:
1. How can I show 2 lines in the chart to compare revenue for the current year vs last year?
2. There are 2 variables for the fiscal period - one for current year and one for last year. The user can enter any value range in the fiscal period variables at query runtime, but the fiscal periods for each of the 2 years must be the same. This means the number of fiscal periods that appear in the query result rows will vary (e.g.. 3 periods for a quarter or 12 periods for a full year). The user has to enter the same fiscal periods for the current year and last year variables. How can I determine the fiscal period values to plot in the line chart for the current year and then last year when the number of rows in the query results will fluctuate?
The legend at the bottom of the chart should show JAN, FEB, MAR...DEC instead of the fiscal period values like 001/2007, 002/2007. Is there an exit I have to change to get this to work?
Thanks for any help you can give!You can do it in multiple ways
1.
SELECT COALESCE(t1.Company,t2.Company) AS Company,
COALESCE(t1.Sales2015,0) AS CurrentYearSales,
COALESCE(t2.Sales2014,0) AS PriorYearSales
FROM Sales2015 t1
FULL JOIN Sales2014 t2
On t2.Company = t1.Company
2.
SELECT Company,
MAX(CASE WHEN YearVal = 2015 THEN Sales ELSE 0 END) AS CurrentYearSales,
MAX(CASE WHEN YearVal = 2014 THEN Sales ELSE 0 END) AS PriorYearSales
FROM
SELECT Company,Sales2015 AS Sales,2015 AS YearVal
FROM Sales2015
UNION ALL
SELECT Company,Sales2014 AS Sales,2014
FROM Sales2014
)t
GROUP BY Company
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
When I send an iMessage from my iPhone to another iPhone that is currently not on WiFi and using a cell connection, does my message show up as blue or green?
vamoots wrote:
When I send an iMessage from my iPhone to another iPhone that is currently not on WiFi and using a cell connection, does my message show up as blue or green?
Your message on your screen shows up blue if sent as iMessage or green if sent as regular text. If not connected to wi-fi or cellular data, iMessage isn't available to/from. Both of you need a data connection for iMessage to work.
But your message on the recipient's screen will show up white. -
How would I create a Summary Chart for the Current Year Using a Count by Month?
Post Author: MarkS
CA Forum: Charts and Graphs
I have a data set of 3 date fields. I would like to create a summary counting all of the occurrances of each of these dates per month, similar to using a SumProduct() command in excel.
For example, my data is as follows:
Registered Date | Application Date | Sale Date
1/1/2007 | 2/1/2007 | 2/20/2007
1/10/2007 | 2/1/2007 | 3/20/2007
2/20/2007 | 3/10/2007 | 3/20/2007
I would like to summarize this information by month as follows:
| Jan '07 | Feb '07 | Mar '07 | TOTAL
Registered | 2 | 1 | 0 | 3
Applications | 0 | 2 | 1 | 3
Sales | 0 | 1 | 2 | 3
TOTAL | 2 | 4 | 3 | 9
Is there any way to do this?Post Author: V361
CA Forum: Charts and Graphs
Yes, but it will require some effort. Group on "Sale Date" Change the group to group by month. You can then create a running total for "Registered Date","Application Date"," Sale Date" For Registered date, I used Field to summarize Registered Date, Type of summary was count, Evaluate use a formula, reset on change of group 1 (I only have one group, "Sale Date") The formula will look like this.
month ({Registered Date }) in [1,2,3,4,5,6,7,8,9,10,11,12]
You would build your other running totals (Counts) using the same methods,
Once you have these, you should be able to create your chart. -
MDX to dynamically create period to date for each month of current year
I need some help with MDX. I am not even sure if this is possible to do but here is what I need. Any help is greatly appreciated.
I have a Date dimension with a hierarchy defined as Year-Qtr-Month-Date
I have a measure called Rentals
Assume the current date is 10/24/2014. I want to display by month for the year 2014, the sum of rentals equivalent to the current MTD. So January would sum 1/1 thru 1/24. February would sum 2/1 thru 2/24. March would sum 3/1 thru
3/24, etc.
On the end of the current month, all months would display the sum of the whole month. I am not concerned if a month ends on the 30th or 31st. The end is end.
It needs to be dynamic enough so that if the current date is the 27th, each month would sum from the 1st to the 27th.Hi Rocko,
According to your description, you want to compare the sum amount of rentals for each month, right?
In MDX, we can use
PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So you can use the query like
with set Period as {[Arrival Date].[Date].[Month].&[2014]&[1]:[Arrival Date].[Date].[Month].&[2014]&[27]}
member [Arrival Date].[Date].[0] as sum({Period})
member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Month], 1, [Arrival Date].[Date].[Year].&[11]), [Measures].[Total Amount])
Here is a sample query on AdventureWorks cube.
SELECT ParallelPeriod ([Date].[Calendar].[Calendar Semester]
, 3
, [Date].[Calendar].[Month].[October 2003])
ON 0
FROM [Adventure Works]
Regads,
Charlie Liao
TechNet Community Support -
We have a report that summarises monthly sales & credits for 2 years in a group footer. The footer is a sum of a formula in the detail section that calculates the monthly sales at the Item code level
Item 1
Group Footer 1 July Aug Sept Oct
Sales Last Yr @July_LY_Sales @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales
Credits Last Yr @July_LY_Credits @Aug_LY_Cred @Sep_LY_Cred @Oct_LY_Cred
Sales This Yr @July_CY_Sales @Aug_CY_Sales @Sept_CY_Sales @Oct_CY_Sales
Credits This Yr @July_CY_Cred @Aug_CY_Cred @Sep_CY_Cred @Oct_CY_Cred
<Curr Yr Graph1>
<Last Year Graph2>
Item 2
Group Footer 1 July Aug Sept Oct
Sales Last Yr @July_LY_Sales @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales
Credits Last Yr @July_LY_Cred @Aug_LY_Cred @Sep_LY_Cred @Oct_LY_Cred
Sales This Yr @July_CY_Sales @Aug_CY_Sales @Sept_CY_Sales @Oct_CY_Sales
Credits This Yr @July_CY_Cred @Aug_CY_Cred @Sep_CY_Cred @Oct_CY_Cred
<Curr Yr Graph1>
<Last Year Graph2>
In the footer under the data, we want a 4 line graph (or 2 x 2 line graphs for this year & last year). One line for sales for the current 12 months, and with it, a line plotting the credits, so as to see the trend over that year. And then we want a line graphing the previous years sales and a line graphing the previous year credits for the 12 months.
On the data tab in chart expert, we selected the Place chart for each SHDOC.ITEM (Item number) in the footer and this is positioning correctly. We have tried selecting "On change of shdoc.item and we have also tried For each record. We selected on change of shdoc.item to generate the graph for each item. We then added the 12 formula for the current year in the Show Value panel
In the show value panel we tried using the detail formula, the Report Area: Sum of <formula> and the Group 1: Sum Formula. They all display as @July or @Aug which is a dependent formula used to identify the month
We have added the above formula for each month and each value, but we can't work out how to group the monthly data into the 4 series of 4 lines (1 colour each) - Current Year Sales, Current Year Returns, Last Year Sales, Last Year Returns for the charting. We have tried to create a graph with only 1 set of monthly data (viz, just 12 months current year sales) But no matter what options we take, we seem to get 12 line chart representing each month rather than 1 line representing 12 months.
Can someone point us in the right direction?Please re-post if this is still an issue but search forums first, lots of chart questions have been answered.
-
Please help. I have a matrix report. In the report I have row group PO Type. One the Column groups I have a parent group by Fiscal Year, and then a child group by Month. When I run the report, I get two years of data back broken
out by month. Please see below.
Now here is where I am getting stuck. I need to take the variance between the current month of the current year, from the same month of the prior year. So I need to show the difference between Oct , 2014 from Oct, 2013. November, 2014 from November
2013... etc. etc.
In the example below, how do I create a column or row showing the variance for Contracts for October 2014. I need to take the contracts for October 2014 which is 3 and subtract that from October 2013 which is 8. Any suggestions? How do I do that
for each month? Then I need to do it for the quarter... then the year? But I'll be happy if I can just get the month working first.
Any help will be appreciated.
here is what my rdl file looks like.
Here is what my report looks like when I render it.Hi Adrian_s2012,
According to your description, you want to compare values for the month of current year with the month of prior year and get the variance. Right?
In Reporting Services, we don't have any function to get this "Year to Year" Growth. In this scenario, if you data source is a cube, we suggest you use Analysis Services to achieve your requirement. If this data source is just from database, it will be hardly
to calculate the variance because we need to compare the values within every two different column group and matrix generate adjacent columns one by one. Even we make it by using custom, every time executing the long code when generating result
in a cell will reduce a lot of performance, we really don't suggest to do that in SSRS. Here is a thread with much easier requirement, please take a reference of that:
http://social.msdn.microsoft.com/Forums/office/en-US/842e2dcb-d949-4297-9d91-eac989692cb5/difference-between-the-grouped-column?forum=sqlreportingservices
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Each year for the past 5 years I make a family calendar and send copies to all he family members around the globe. I hate that I have to recreate all the birthdays and special occasions from scratch, and re-drag all the photos onto these dates, in the lower half of the page of each month on the new calendar. How can I create a new calendar for the current year and port all of these photos/comments into the new calendar from last years calendar, to save having to redo all this work!! I am not talking about the upper half page of the photos only...I am referring to the calendar page of each month.
Thanks in advance.
ColinWelcome to the Apple Discussions. Open iWeb so you see your original site in the left hand pane. Use the File->New Site menu option to create a new site. Give it the name you want.
Now select a page in your original site and type Command+D. That will duplicate the page. Drag the duplicate page down to the new site and rename it as needed. Do that for the other pages you need in the original site.
OT -
Current Month, Current Year Variable on Posting Date
Hi,
I need to construct a BEx variable that will return the Current Month of the Current Year based on Posting Date. I want to be able to compare Current Month of the Current Year with Current Month of the Prior Year. I know SAP delivers variables for this based on 0CALMONTH. Is there any way to create the variable off Posting Date without having to write a customer exit?
Thanks,
CI guess you could use replacement path variables for the same. No need to write customer exits.
Create 2 variables, one on calmonth and the other on calyear.
Variable on Calmonth -
type - replacement path.
Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 2 and offset length 2.
Variable on calyear -
type - replacement path.
Replacement path tab - repace with variable, give variable name into which user enters the posting date, replace with key, offset start 4 and offset length 4.
to get key figures for current month and previous year, restrict the key figure with calmonth variable created above and use offset on the calyear variable created above, like zcalyear - 1. -
How to set current year,month as default value in combo box
hi, im newbie of xcelsius user
i realize that hv a issue that display combo box base on year & month
let said
<b><u>step 1</u></b>
I create excel data like this
<b><u>year___ </u> </b> | <u><b>month_ </b></u> | <u><b>Product</b></u> | <u><b>revenue</b></u>
02-04-09 | 02-04-09 | a | $4,154
03-04-09 | 03-04-09 | b | $6,813
04-05-09 | 04-05-09 | a | $9,875
05-06-09 | 05-06-09 | b | $6,813
06-04-10 | 06-04-10 | a | $6,813
07-04-10 | 07-04-10 | b | $9,875
08-06-10 | 08-06-10 | a | $9,875
22-06-10 | 22-06-10 | b | $6,813
<u><b>Step2</b></u>
Then i go format cell to format/custom date to year & month
Eg1: Year u2013> 02-04-09 convert to u2018YYYYu2019 (2009)
Eg2: Month u2013> 02-04-09 convert to u2018mmmmu2019 (April)
So output like this
<u><b>year</b></u> | <u><b>month</b></u> | <u><b>Product</b></u> | <u><b>revenue </b></u>
2009 | April | a | $4,154
2009 | April | b | $6,813
2009 | May | a | $9,875
2009 | June | b | $6,813
2010 | April | a | $6,813
2010 | April | b | $9,875
2010 | June | a | $9,875
2010 | June | b | $6,813
But the problem is when i insert to combo box,use u201Cfilter Row u201D, i excpectation will display only 2009,2010
But Actual display the Year in combo box is duplicated :'(
so any solution ? and then only how to set current year & month as default value :'(
thanks,
regards
s1
Edited by: Leong Pui Kee on Feb 25, 2011 5:25 AM
Edited by: Leong Pui Kee on Feb 25, 2011 5:36 AMhi,
your created data
step 1
I create excel data like this
year___ | month_ | Product | revenue
02-04-09 | 02-04-09 | a | $4,154
03-04-09 | 03-04-09 | b | $6,813
04-05-09 | 04-05-09 | a | $9,875
05-06-09 | 05-06-09 | b | $6,813
06-04-10 | 06-04-10 | a | $6,813
07-04-10 | 07-04-10 | b | $9,875
08-06-10 | 08-06-10 | a | $9,875
22-06-10 | 22-06-10 | b | $6,813
In this, year and month both are same data, make the diffent data like year 2009, 2010 And month Jan, Feb, March, ...Etc
and also one more check you formulas on month and year, select correct source data, destination data for compoonent..
OR
from above, to create a date column and convert date-->year, date--> month and Explore it.
All the best,
Praveen -
Need To Create Box That Shows Previous Month Label And Amount Of Sales
I am using CR2008
I am creating a report for our salesmen and one of the fields in the report will be a text box that shows what the last month was. For instance, if the report is run this month, the report will plug July 2011 into the box because that was what last month was. Tied to this will be a salesman's total sales for last month that should show up in a box. I will place this box right next to the salesman's name on the report as the names will be static.
I have several of these to do and if I can see the method I can re-create it for the others.
How would I do this?Hi
You can create a formula to get last month and this formula can be placed in a text box.
dateadd('m',-1,currentdate)
or
Month(currentdate)-1&" ,"&Year(currentdate)
This formula can be placed for all your salesmans
Thanks,
Sastry -
Current Year and current month?simple question
How can i get four Digit current Year and two digit current month. So if is march it should get me as 03 and the Year as 2002. Please do help me, is a simple question isn't it ?. Thanks for your earliest response.
Thank you.i have a directory structre of the format
REPTS2000209/E200209-98000001
in which 2002 is current YEAR
09 is current month
and 9800001 is the code i would submit(list box) from a form
so what i need is a program that can generate the above path and open that particular PDF file
so basically E200209-98000001.pdf is the PDF file.
i am submitting it from JSP page. PLEASE HELP ME how can i program. -
Hello,
We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario;
The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
(the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
SELECT
NON EMPTY { [Measures].[Revenue Amount],
[Measures].[Utilization],
[Measures].[AVG Revenue Rate],
[Measures].[Actual Hours] }
ON
COLUMNS,
NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
MEMBER_UNIQUE_NAME
ON
ROWS
FROM
( SELECT
( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
ON
COLUMNS
FROM
( SELECT
( { [dimIsBillable].[Is Billable].&[True] } )
ON
COLUMNS
FROM
[SSASRBA]
WHERE
( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
BACK_COLOR,
FORE_COLOR,
FORMATTED_VALUE,
FORMAT_STRING,
FONT_NAME,
FONT_SIZE,
FONT_FLAGSHi Hans,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Simon Hou
TechNet Community Support -
Reporting on Previous Month/Current Year - Jan 09 fix
I currently have about 10 reports that are being filtered to only show data on the repository variables for :
PreviousMonth and Current Year.
When Jan 1, 2009 comes around, these reports will be kicked off to show Decemeber of the Current Year, so December of 2009.
What is the best/easiest way to fix this problem for the future?What Shiva meant was to let YEAR be a Presentation Variable that the user can select from, say a drop down list of "years."
But consider this. Whenever the month of the "system date" is January, you want the year to be one less than the "current year." For all other months, you want the year of the "system date."
PrevYear = CASE WHEN MONTH(Calendar."System Date")=1 THEN YEAR(TIMESTAMPADD(SQL_TSI_YEAR, -1,Calendar."System Date")) ELSE YEAR(Calendar."System Date") END
And since you weren't sure about how to do the previous month...
PrevMonth = MONTH(TIMESTAMPADD(SQL_TSI_MONTH,-1,Calendar."System Date")) -
Hi There!
We have 4 Adobe CC accounts that we currently pay per month. Is it possible to pay it forward? When I create a new Adobe CC account I see it as a "prepaid option".
Our annual subscriptions expires on December 16, am I supposed to just order 4 new subscriptions with prepaid credit payment?
Thanks and best regards,
EgonWhat you need is merged help.
You generate a parent and all the child projects. You always install the parent and then whichever child projects you require. The TOC, search and index automatically adjust. See the pages on my site.
Note though that many people take another view to your Product Development. Show all the help and then people see information about something and realise they need it!
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge
Maybe you are looking for
-
I Have 2 issues; 1. I can't transfer my iTunes library from my old computer which I can't get into due to a virus. I'm trying to transfer my iTunes folder to my sons computer in which I now have a user account. Old is Vista and new is Windows 7. The
-
Dual Monitor Full Screen Images
Hy to everyone, I have a G5 with dual monitor out set to 1024x768 each, for a total resolution of 2048x768, i created images graphics of that resolution(2048x768)like jpg tiff, flash,and I want to display these enterely on the two monitors not only i
-
I Have bought a Bose Soundlink AirPlay which is connected to my home wifi. My MacBook, iPad and iPhone are all connected to the same wifi. The Bose sometimes shows up on the AirPlay list but mlst of the time does not appear. I have 2 Apple tvs which
-
I have a situation where i need to write a case when sql expression to fetch certain rows from a table. How to use CASE WHEN THEN ELSE END in a report query ? Explanation with a simple example will be of great help. thanks
-
Hay Friends.. in my code i am generating a randum number (rng), Now i want to check TWO conditiond. Is my number LESS THAN EQUALLS TOsomenumber (let say 0.3) and GREATER THAN EQUALLS TO somenumber (let say 0.58)...I M NOT SURE AM I DOING IT WRITE OR