continuous subform, subtotal in footer - ms-access

I have a subform for a table order, called orderdetails.
orderDetails has some textboxes that I need to a total from namely, total quantity, total cubic meters and total weight.
quantity and weight are directly inputted by the user (e.g. qty = 10, weight = 22.55) while total cubic meters is a calculation based from user inputs (length * width * height = cbm, sum of each row).
I have named my controls as txtQuantity, txtWeight, txtCBM and their control sources as quantiy, weight, cbm.
I've placed my unbound textboxes at the footer, and placed the formula =sum(txtQuantity) and have gotten #error. I tried =sum(quantity) and also got a #error.
Another side effect is that after placing these controls, I would also get #name for the controls that they are summing(sometimes. I can't pinpoint when, but if I remove the controls in the footer, they all go back to normal).
How can I resolve my totalling problem?

Related

SSRS range bar chart, different color when no data

I am looking to change the color in the "gaps" in the range chart that I have built.
Essentially I am trying to build a visualization for the staff to see the availability on bays. The red markings mean the bay is booked, I wanted green then to be in between the red to highlight free bays.
Occupied bays:
I suspect I need to go back to my dataset and add in some date tables to show "null data" to allow a "switch" to work, but I thought someone might know if I could change this without going this way.
An example of the dataset would be:
Following up
here is a screen shot of my output, i added data labels to see if i was going wrong...HOWEVER I also added shadows to my data and my data is actually still there, just hiding behing my secondary bars......
you are right about my data set, i had to add a series grouping to get my appointments all to appear other wise i was just getting the first appointments on the row only to appear....
Following up 2
A further follow up, I have followed #iamdave 's excellent RangeChart.RDL
I have applied my dataset to it but I am now getting the following output, I know I am probably missing something simple, my gut is telling me the cust_id are seperating all the appointments on to seperate lines yet I have both the primary and secondary axis set to "DrawSideBySide = False"
Here is my set up..
here is my latest output, if I could just group all the rows/bars/lines down to the 6 bays it would be great.
You can do this by adding in another data series based on your original dataset, that will require significantly less processing than filling in all your empty periods as suggested by WEI_DBA.
In your dataset, add a new column that returns dense_rank() over (order by BAY) as BayID (order by should be your desired axis label).
This may be best done as a wrapping select statement to preserve the rest of the query logic as is.
In your Range Chart, add in another Values item, with the same Category Field as your current one.
Set the Top Value to 1 and your Bottom Value to 0.
You could also set this to the min and max time of your dataset or the start and end period of your report to only cover the period the Bay was available.
Set it to display on the Secondary Axis for both Vertical and Horizontal axes.
Also select the Do not show this series in a legend option.
Set up the Secondary Vertical Axis in exactly the same way as your Primary Vertical axis.
Set the Secondary Horizontal Axis Minimum and Maximum to the same values as your Bottom and Top above.
Hide both the Secondary Axes.
Select the new Values item and in the Properties window, expand the CustomAttributes section and change DrawSideBySide to False.
If necessary, adjust the order of the Values items in your Chart Data window to make sure the new Range Bar displays underneath your actual data.
Select the original Values item and in the properties sidebar navigate to Data > DataPoint:
Change AxisLabel to =Fields!BAY.Value (Your axis label).
Change Values > X to =Fields!BayID.Value (Value from point 1.).
You should now have a range chart that that displays your data on top of a solid bar, that you can set to any colour you require:

Side by Side Stacked Bar Chart totaling to 100% in Tableau

I'm trying to visualize the SO Developer Survey in Tableau. I have a side-by-side stacked bar chart. On the x-axis I have job satisfaction, separated by gender. (So, columns: job satisfaction, gender, both are dimensions). On the y-axis I have "most important aspect of a job opportunity" (So, rows: measure values, with each value being a COUNT).
I would like each bar to total to 100% so for each value in measured values I have set the quick table calculation to "Percent of Total" and am computing using cell, but when I do so, every value appears to be equal/100% within the bars.
Can anyone tell me what I am doing wrong? Each value should be some percentage, all totaling up to 100%.
I was trying to follow this tutorial: http://kb.tableau.com/articles/howto/stacked-100-percent-bar-chart
Percent of total computed by cell will always give you 100%. Tableau is telling you that each cell represents 100% of the value for that cell. You will need to change your compute using to get the correct answer.
Here is an example using the "superstore" data set that ships with Tableau. To calculate the percentage breakdown for each region I use the Percent of total table calculation and calculate it by "Pane" which means that the percentage is showing me a value per region (so, "technology" represents 33.999% of sales in the "central" region):

Re Legend values repeating in SSRS chart

I have a small prob in my chart legend. It shows like below at present. I just want to see AP1, AP2, PRIN and just one Total. Is this possible?
You can stop a series from appearing in the legend by going to the series properties and ticking 'Do not show this series in a legend'. How your chart is set up at the moment, you could do this to all but one of your Total series so that only one shows in the legend.
However, it may be more beneficial to make it clear what each separate total is calculating. If each is totalling a different set of data, you should make their styles different and change the Custom Legend Text to specify what is being totalled. If all the totals are supposed to be the same (i.e. Total = AP1 + AP2 + PRIN) you should check your calculations and only include the series on the chart once.

Sum in a textbox with calculated values

I have got a Column (Weight) which is multiplied by the amount. I need an extra textbox in the footer which shows the Sum of Weight. But I only get the weight of the non multiplied data. Is it possible to SUM the weight without the footRow for the tablix?
Firstly get the name of your textbox in properties then you add textbox in your footer and add this:
ReportItems![Text Box name].Value

Third Axis in SSRS

I have a graph with the following axis:
This graph works fine, but I need one more addition to it.
My question is this:
I need to get a third line on there with the total amount of units for each month. I have a field that I can pull that has this total by month, but how do I go about putting it on my graph? When I try to add it, it wants to do it by manufacturer, which is not what I want. I just need a single line that has this total amount of units. Do I need to add it to the axis under manufacturer or up top next to the market percent axis?
It's a tad bit complicated, but this is what I would do:
Union the Total Units values to the Manufacturer % values and put it on a Secondary Axis. The data set would look something like this:
Chart Category = RecordDate
Chart Series = SeriesID (Group/Sort By) and SeriesLabel for the Label
Chart Value 1
Primary Axis
Expression: =iif(Fields!SeriesID <> 3,Fields!Value.Value,nothing)
Chart Value 2
Secondary Axis
Expression: =iif(Fields!SeriesID = 3,Fields!Value.Value,nothing)
Hide Legend for this Axis
Set the Line Color for each Chart Value to be conditioned on the SeriesID so the "Total Units" Marker Color in the Primary Axis Legend matches the Line Color on the Secondary Axis. Something like this: =switch(Fields!SeriesID.Value=1,"Red",Fields!SeriesID.Value=2,"Blue",Fields!SeriesID.Value=3,"Green")
Here is what we end up with: