Adding a chart to a matrix, spanning it over several rows - reporting-services

I have hit a snag in Report Builder 3 and was wondering if someone can set me straight.
I have a matrix that displays 7 important numbers by RevenueCategory, By Region, split out by month.
Works great.
I have each of those 7 numbers down in the Totals section to show how the Region overall is performing.
That works great too.
I added the line chart inside the Revenue Category as shown in the pic below.
THAT works great.
What I can not seem to figure out is how to get the same line chart added down in the totals section where I have drawn the big red "X" in the image below. In the space where the existing line chart is, I somehow managed to get everything there to be one cell. As you can see in the image, the same is not true in the total section. It is 7 individual cells. I do not get the option to merge those particular 7 cells (but I do get the option in the 7 cells immediately to the left of the red "X"... it just looks bad if that chart is out of line with all of the RevenueCategory ones).
I have fiddled around with groups to no avail... I am pretty new to SSRS, so I hope that I'm just doing something wrong and it can be done... I'm not sure what else to try though.
Any suggestions would be much appreciated!!
WELLLLLLLLLLL, crud.... After all that, I don't have enough reputation points to include my screen shot.... throwing this together and using numbers without any effort to make the math line up, so please overlook the numbers!
In a nutshell want a chart down in the TOTAL section, but I've managed to make that area 7 distinct rows that I can't seem to get back into one like happened when the Revenue Categories were grouped.
Region | Revenue Category | | | Jan | Feb | etc.
NW Direct Sales <working chart> Net Sales $100 $200
| Budget $50 $200
| Variance $50 $0
<same chart> % to Budget 200% 100%
| Forecast $100 $200
| Forecast Var $50 $0
<bottom of same chart> Forecast % 200% 100%
------------------------------------------------------------------------------
Internet Sales <working chart> Net Sales $100 $200
| Budget $50 $200
| Variance $50 $0
<same chart> % to Budget 200% 100%
| Forecast $100 $200
| Forecast Var $50 $0
<bottom of same chart> Forecast % 200% 100%
--------------------------------------------------------------------------------
TOTAL Want a chart HERE Net Sales $200 $400
that spans these Budget $100 $400
seven rows like Variance $100 $0
it does above, but % to Budget 200% 100%
I can not get these Forecast $200 $400
rows grouped into Forecast Var $100 $0
a single cell! Forecast % 200% 100%

Hey what you can do is add a group to both the rows in that tabel.
I think if you are using Report builder tool you can see "ROW Groups" at the bottom where you can see the group you created. Right click on it you can see a Add total field in it click on it .It automatically creates a row for the above columns with the addition of the data. Now run the report and you can see exact data. But i am not sure which tool you are using.

Related

RunningValue Column

I have a report that pulls a beginning inventory value and puts it in the header of the report - "Textbox12". Then in the report there is a column that tells me how many of that particular part has shipped out or been received that day and displays that as a total (may be a negative number if we send more out that we get). How do I keep a Running Value where the first row of the report starts with the beginning balance and adds the daily change in inventory? The thing that I cant figure out is how to start with the 'Report Item Value' which represents the daily beginning balance.
My inventory report
PART No 1: beginning balance - 12345 (Textbox12)
Daily change | Total in stock
+1 | 12345+1
-2 | 12346-2
0 | 12346+0
The daily change expression is also a formula that looks at inbound and outbound columns/values in the report and totals those if that matters.
I don't think you can reference a reportitem from a tablix cell due to the order items are processed. I think the header and footer are done last so you can reference a tablix cell from the header but not the other way around.
You don't say how you get the opening balance but you should be able to copy the expression from Tetxbox12 and use that plus the RunningValue() of the DailyChange column.
So you would end up with something like this
=MyTextBox12Expressionhere
+
RunningValue(Fields!DailyChange.Value, SUM, "myDataSetName")
If this does not help, show a sample of data, the structure of your dataset and the expression in Textbox12 and I can revise the answer.

SSRS - How do I achieve bars coloured according to projects in a Gantt-chart?

I am attempting to create a graph to visualize a kind of facility-utilization stat.
My query returns rows like so:
|StartDate |ProjectNumber |Facility-ID |Hours |EndDate |
|2016-01-01 00:00:00 |Project-A |Fac-A |4 |2016-01-01 04:00:00|
|2016-01-01 04:00:00 |Project-B |Fac-A |3 |2016-01-01 07:00:00|
|2016-01-02 00:00:00 |Project-C |Fac-B |2 |2016-01-02 02:00:00|
|2016-01-02 02:00:00 |Project-B |Fac-A |8 |2016-01-02 10:00:00|
|2016-01-03 00:00:00 |Project-B |Fac-A |8 |2016-01-03 08:00:00|
|2016-01-04 00:00:00 |Project-B |Fac-A |8 |2016-01-04 08:00:00|
I followed the tutorial here:
http://pnarayanaswamy.blogspot.dk/2010/09/range-bar-chart-gantt-chart-using-ssrs.html
To set up a Gantt-chart to visualize Hours, per day, per facility (Facilities on Y-axis, days/dates on X-axis, and the bar-colour to represent which project the hours belong to.)
The idea is to provide a visual idea of how many hours of the day a given facility is in use (coverage, out of 24 hours), and by which project.
I have almost achieved this, however, my chart will group together any rows with the same facility/project/hours, meaning that if I the same project registers the same amount of hours on the same facility on two consecutive days, the chart will only show the hours for the first of the two dates.
My chart-grouping looks like this (QTY is Hours)
I have attempted to add startdate to the series-grouping to help distinguish between the rows and prevent it from grouping, however, this makes the chart create a group for every unique combination of date/projectnumber/facility, which is not desired.
How do I make the chart group according to hours per facility per day, distinguished by project? I feel that I might have to add a column to my query to help this matter, but I'm not sure which.
EDIT:
Forgot to mention that I work with datetimes to draw the ranges in the chart. These are calculated in my query into startdate/enddate
The closest I can get is to use the details of the work completed in your Category Groups. This is available by deleting all groupings and then clicking on the green + icon:
Once you have done this, you can specify what you want to display on the vertical axis by clicking on the Series Properties for your Range and filling in the Category Field:
The result isn't ideal, but after a bit of work on the presentation it could be serviceable:
Are you looking for something like this? click 1 to see example chart
If so, try separating your day and time. Get start and end time and also Day (shown in example as Dte).
Then set it up like this: click 2 to see example set up
I've managed to come up with a solution to the problem that I am somewhat satisfied with.
By adding the startDate-field (any date field) to the series groups, the chart will properly display and group the hours for each date; however, this creates duplicate entries in the legend for each unique date that a project has hours registered.
It does solve the grouping-issue in the chart, which was the main concern.
As hinted by IamDave in his comment, the (seemingly) only way of properly making the color of the chart-bars reflect the project it stems from, was to use the fill-color property of the series.
To achieve this, I added a step in my query, which assigns each unique project in the result-set an incrementing number from 1 and up; which in the report is used in the fill-color expression for the series Example
The values are static, but goes up to 60. I do not expect to visualize more than 20 projects at once with this report.
This however, still leaves the legend, which will contain duplicates, if a project has posts on more than one date, but I am content with the result as it is.

Access Dynamic entry form

First off my Access skills are sub-par, but I'm fairly certain that it is the direction I need to go for my project so I'm hoping I can get some feedback to direct my research. I am however well versed at Excel, VBA and Matlab so I'm not completely incapable, I hope.
I need to assemble a system to track emissions (chemicals) from a variety of sources (units). Each unit has its own set of possible emissions and they need to be tracked daily (but also have the capability to be entered for multiple days at the same time).
What I would ideally like to have is an entry form that initially has 2 dropdown boxes, one to select the month/year and the other to select the unit.
Once selected I would like to auto populate a table that has the entire months dates in column 1, and then all of the possible emissions for that unit in the next 2:N columns. Then I would like to query the existing database to populate any data that has already been entered for the date/unit combination.
At this point need to let the users input new data, either for just one day or for numerous days. Then save it to the database.
I have approximately 70 possible emissions and approximately 40 units. I will need to be able to add new units and specify their chemicals as well as add new chemicals to existing units as their duties change. I would also like the ability for multiple users to be entering data simultaneously, which I believe is a hallmark of Access and may not be something I have to "turn on".
I hope that there is a way that Access can help me do this and not necessitate using Excel (which is very clunky in this case).
Thanks in advance,
Ben
The format for the data can simply be:
Date Unit Chemical1 Chemical2 Chemical3
1/1/16 UnitA 0 0.1 0
1/1/16 UnitB 0 0.3 0.2
1/1/16 UnitC 0.2 0 0.5
I'll need to do more analysis of the data, but given it as shown would be more than sufficient for the remainder of the work.
For the data entry from I would like to have two drop down boxes: (1) Month/Year and (2) Unit Name. And then the form that the users would fill in would list each day of the month in the left-most column and then give all of the chems that unit could emit in the following columns.
So if:
Unit1 was able to emit ChemA and ChemC
Unit2 was able to emit ChemB
Unit3 was able to emit ChemA, ChemB, and ChemC
So the entry form for Jan-2016 for Unit1 would give them the following assuming today is the 3rd and they have entered data for the 1 and 2.
(1)Jan-2016 (2)UnitA
Date ChemA ChemC
1/1 0.1 0.2
1/2 0.2 0.1
1/3
Then selecting unit 2 would change the available columns and again show the last 2 days entries and allow for the entry of today
(1)Jan-2016 (2)Unit2
Date ChemB
1/1 0.1
1/2 0.2
1/3
Finally Unit3 has all 3 chemicals available and would show the previous data and the blank entries.
(1)Jan-2016 (2)UnitB
Date ChemA ChemB ChemC
1/1 0.1 0.1 0.1
1/2 0.2 0.2 0.2
1/3
I don't mind (and would prefer) that all of the dates for a month were populated and not just the next date. So that January would have 31 rows, Feb would have 29 (this year), etc, etc.
01-21-2016
Wayne, my current tables are:
UnitList
ID UnitName UnitOwner UnitLocation UnitDesc AllowedChems
The last column AllowedChems, is a multiple selection that is linked to the table ChemicalList which looks like:
ID ChemicalName MassUnit Type
Where all of the entries from ChemicalName are possible selection in the AllowedChems field of UnitList
Then I have a table called Tracking with the columns:
ID EDate UName Vent ThOx
At the end of this list I would like to have a column for each of the chemicals listed in ChemicalList, that way the users can input a number for the mass of that chemical they are emitting and it will be transferred to the correct column. But I'm as yet unable to determine if I'm able to build columns by linking them to the contents of another table. Perhaps there is another way around this?
For example if my chemicals are listed in the ChemicalList table as:
ID ChemName
1 ChemA
2 ChemB
3 ChemC
Then I want the Tracking table to look like:
ID EDate UName Vent ThOx ChemA ChemB ChemC
And grow each time a new chemical is added.

SSRS filtering a series (not a group) or using multiple datasets

I feel like I'm missing something very obvious, but searching hasn't given me a solution and I hope someone can help.
I am working on a simple chart. X axis is the date (day), Y axis is a simple number (1 to 100).
I have totals, for 3 different sites, per day. I need a line for each site on the chart.
Day | Site | Value
---------+--------+-------
Monday | site X | 30
Monday | site Y | 45
Monday | site Z | 20
Tuesday | site X | 35
Tuesday | site Y | 26
Tuesday | site Z | 12
and so on..
There is only 1 total value per day, per site.
I am trying to create 3 lines on the chart, one for each site but I can't figure out how to filter on the series level. (I'm working on a very large date range, so lines work better visually rather than doing a series group of bar charts, or even stacked bar charts)
I originally tried the multiple dataset work around (using an expression and something like
sum(field!total.value, "site X")
but that didn't work (it showed only a straight line, the first value I think) . Now, I have one dataset, but I can't find a way to filter series so they only show for one site.
I also tried this IIF
=iif(Fields!site.Value = "site X", fields!total.value,0)
but that gives a weird looking line.
I can't believe this is not possible in a chart in SSRS, I mean, it's pretty basic, so I must be missing something.
Thank you for your help.
You need to set up a chart as follows
The Values are the actual numbers you are attempting to chart
The Category groups as set up here are the individual dates.
The Series Groups are your Sites
At this point I then set the Horizontal Axis to be in Scalar/Dates format so the designer looks as follows
When you run this report using an adaptation of the (brief) dataset example above you get the following

Calculating Gross Profit Margin from COGS and Sales Revenue in XBRL

Let me start by saying thank you for taking the time to read this.
I am creating an XBRL document using Altova Stylevision. I have properly brought in the XBRL Taxonomy and so on. I am creating some pie charts to show 1, sales revenue for three companies and % of sales revenue each company holds of the entire amount. I am doing the same thing with gross margin.
My COGS account is 400020 and my Sales Revenue account is 800000.
The following code is used to break up the three companies that I am comparing:
for $i in distinct-values($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail/gl-cor:identifierReference/gl-cor:identifierCode) return $i
The following code calculates Sales Revenue
sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount)
The following code calculates % of Total Sales Revenue for each company
round-half-to-even(sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/
gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount)
div sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' ]/gl-cor:amount)
* 100, 1)
The following code calculates Gross Profit
sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount)
-sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='400020' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount)
The code is essentially the sum of my sales revenue account per company at the current time - the sum of my Cost of Goods Sold account per company at the current time.
All of this code above works, yay me!
When I go to calculate the Gross Profit Margin my head explodes, haha. I thought I could do something similar to the % of Total Sales Revenue code but I just can't seem to get it.
This is the code I have but does not properly calculate Gross Profit %
round-half-to-even(sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount)
-sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='400020' and gl-cor:identifierReference/gl-cor:identifierCode=current() ]/gl-cor:amount))
div sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='800000' ]/gl-cor:amount)
- sum($XBRL/xbrli:xbrl/gl-cor:accountingEntries/gl-cor:entryHeader/gl-cor:entryDetail[gl-cor:account/gl-cor:accountMainID='400020' ]/gl-cor:amount) * 100, 1
I think the issue is because I am dividing the sum of my Revenue account - the COGS account but the div tag is only in front of if the Revenue portion of the statement. However, no matter how I try to write the statement I get an error that won't even return a result unless I type it this way. The results it outputs is a % in the hundred thousands and a second percent of 1 for each company. Obviously, it should only be outputting one percentage for each company for a total of three percents.
I am not really sure what to try next and I really hope it is just a syntax error but any help with syntax, or rewriting the statement is greatly appreciated!
Thanks,
Joel
In the predicate of your XPath expressions you should use the variable =$i instead of =current() to compare with the actual company in the for loop.
Hope this helps.