I am creating a report that has to mimic and existing report… it has grand totals and subtotals.
Problem is the subtotals are based on different criteria…
So:
Apples 5
Oranges 6
Beans 3
Grapes 8
Peas 3
Total Fruit: 19
Total Veggies: 6
Grand Total : 25
Assuming I have a field that tells me if an item is Fruit/Veggie, how can I create grand subtotal row (at the bottom of the page) that will only add based on the value of another field?
I do not want separate groups. The format should remain as is.
Add calculated fields to the underlying dataset that total Fruit and Veggies separately. That way the appropriate sub total can be based on the calulated field.
If you had a field that was ItemType, containing "Fruit" and "Vegetable", you could create a function like =Sum(Iif(Fields![ItemType]="Fruit",1,0)) to sum only the fruit.
Related
I have a table like this image.
I want to create report from that table with condition.
I want to sum if Purpose Column is Banana then sum LoanAmount. Example: On the table There are 2 records of Purpose= "Banana" So LoanAmount will be 120000 for Banana. I also want to sum LoanAmount if LoanStatus="UC" and so on. How can i create that report?
One option is to simply insert a CrossTab in the report header or footer. Set rows to 'Purpose' and value to sum as 'Loan Amount'.
Another option is to create 3 formulas. The one for 'Banana' would look like:
IF {Purpose} = "Banana" Then {LoadAmount} ELSE 0
Then SUM those formulas to get the totals.
You can also use a Running Total with an evaluation condition but the approaches above are better.
I have a data source which is a database table where I group the number of active customers by SalesOwner.
What I want to do is filter my sheet using SalesOwner so that I can make a bar chart that contains one of SalesOwners together with the Grand Total. What happens as of now is that when I filter my data and select one SalesOwner, the Grand Total obviously shows the grand total of that one filter.
Is there a way around this? A bar chart with just one of SalesOwners and the total?
You can use a fixed level of detail expression:
https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_overview.html
In this case, something like {FIXED : COUNTD(wk_customer)}. You would create a calculated field named Grand Total that uses that calculation.
I have data like this
Type Buy Sell
Car1 23000 15000
Car2 24000
Car3 25000
I used sum(#buy) for total buy field and sum(#sell) for total sell field.
Can I sum all or grand total that like sum(#buy) + sum(#sell) ?
because when I run in VB6 for preview that report, Grand total not show on, please help me master.
For this there are 2 approach.
Via Formula :- add a formula field and in that add give above condition in formula field editor. put this field in your desired location, but ideally put in report footer or group footer(if any).
Use running total or summary total.
Check this links
Crystal Report Sum of a Column data
https://forums.asp.net/t/1971464.aspx?Sum+of+Total+in+Crystal+Report+
I am trying to consolidate the records on my report to show only unique lanes (Shipper State and Destination State).
My data is currently grouped by customer group and then customers that fall within each group.
Ideally I would like my data to fit in this format.
LANE ACCEPTED Total Percentage
Customer Group: Fruits
Customer: Apple
GA-TN 1 2 50%
GA-FL 2 3 66%
Customer: Bannana
GA-TN 2 4 50%
Total 5 9 55%
Currently my data looks like the image attached.
Thank you in advance.
1) Consolidated the Lanes by creating it in Formula Field, followed by creating adding it to the Group
I am working on a report that shows Part Numbers with multiple Purchase Order numbers, Order Quantity and Shipped Quantity. First I grouped Part Numbers.
Part # 21104-2F PO # S7CEO Order Qty: 10 Shipped Qty: 0
PO # S7CEO Order Qty: 10 Shipped Qty: 0
PO # S8LVU Order Qty: 5 Shipped Qty: 0
Sometimes we split jobs within a purchase order. For example: (look above at PO # S7CEO) you order 20 of part # 21004-2F. We separate it into two lines (or jobs) of 10 parts per job. In this report I only want to see that you ordered 20. To achieve this, I created a second group for Purchase Order numbers and inserted a sum so that way I only see that you order 20 parts.
Part # 21104-2F PO # S7CEO Order Qty: 20 Shipped Qty: 0
PO # S8LVU Order Qty: 5 Shipped Qty: 0
My dilemma: I need to show an average based on how many parts you ordered (so average of the 20 parts, not the 10) but CR is giving me an average based on the 10 parts.
How do I create an average based on sums?
I tried using a formula to calculate the sum then divide by line count. There are 3 “lines” but once I grouped and inserted a summary, there are 2 different purchase orders. The line count formula is counting "3" lines. I want it to count how many groups I have so it will come up with "2". Then I will be able to divide "groupcount" (2) by total order qty and that will give me an average. Is there a formula that will help me achieve this?
Thank you in advance!
Yup, Count counts all the records. Use DistinctCount, which counts the values instead:
Sum({OrderQty})/DistinctCount({PO})
That should give you 2 instead of 3 in the denominator.
As long as you're outputting the data into the group footer, you can use a SUM(shipped quantity)/COUNT(PO #) to get the average parts/shipment.
e.g.
Two level grouping on Part # (group #1) and PO # (group #2). You'd output the actual data in the Group Footer #2 field. To do your average, you'd add two summary values in that footer: SUM(shipped quantity) and COUNT(PO #). Then a simple formula field to do SUM/COUNT of those two values, and you've got your average parts per shipment value.