I am trying to create a Google Spreadsheet for my sales for my business, that is happening on several different online portals e.g. Amazon, eBay, My Website, etc.
This is what I created:
But if I create this way then I do not get any graphs, which I really do need.
Though I tried other ways too, in which I had the portals in row 1 and dates in Column A, but in that case, I can have only one parameter, either No of Sales or Total Sales (rupees)
And the graph for this comes out nicely:
However, in this case, I would have to create separate sheet to record the Sales in Amount.
Is there a way to work this situation out, where I can create one table, and have graphs showing me the data as required as well?
This is a good application for Pivot Tables. Starting with your source data, you can either create pivot tables from the GUI (Data > Pivot Tables...) or by a formula using the QUERY function.
For example, this formula will create a table with portals in separate columns:
=QUERY(A:D,"SELECT B,SUM(C) WHERE A != '' GROUP BY B PIVOT A")
Note: A chart of this data requires that all cells be filled with numbers, so it's necessary that your source data includes zero values for portal/days with no sales, as shown in this sample data:
A B C D
Portal Date No of Sales Total Sales
Amazon June 18 33 45.62
Flipkart June 18 2 2.64
Biocarve June 18 3 4.32
Ebay June 18 0 0.00
Amazon June 19 22 37.01
Ebay June 19 2 3.52
Flipkart June 19 0 0.00
Biocarve June 19 0 0.00
Biocarve June 20 5 6.47
Flipkart June 20 1 1.45
Amazon June 20 8 10.69
Ebay June 20 0 0.00
The pivot table output is:
Date Amazon Biocarve Ebay Flipkart
6/18/2016 33 3 0 2
6/19/2016 22 0 2 0
6/20/2016 8 5 0 1
And the chart:
Likewise, this formula:
=query(A:D,"select B,SUM(D) WHERE A != '' GROUP BY B PIVOT A")
...tabulates the total sales, with this result:
Date Amazon Biocarve Ebay Flipkart
6/18/2016 45.62 4.32 0.00 2.64
6/19/2016 37.01 0.00 3.52 0.00
6/20/2016 10.69 6.47 0.00 1.45
You can also get all the summary data into one table, and produce a chart from that. (You need to customize your chart series to use left & right axes.)
The query:
=query(A:D,"select B,SUM(C),SUM(D) WHERE A != '' GROUP BY B PIVOT A")
The resulting table:
And an example chart from that table:
Related
i have a table with detail transaction for lot. Lot are harvest and store before being ship.
Date lot transaction qty
5 sept 3 store 300
8 sept 3 ship -50
10 oct 3 ship -20
15 nov 3 ship -20
...
If i want the inventory for a specific moment, i simply sum between to date
I would like a query that can give me a sum from store to a specific month throught the entirr year like:
Lot sept to oct to nov ...
3 250 230 210 ...
Select lot, sum(qty) from ... where (date > 1 sept and date < 1 oct) as sept, (date > 1 sept and date < 1 nov)... group by lot
I did'nt find anything or figure out how to do it i a simple query.
Regards
Obtain one table with a query where is see the evolution of quantity over the year.
Im trying to design a dashboard wherein I need a parameter to control 2 things.
If I select "Rolling 12", I should be able to see the last 12 months of my data with respect to current month. When I select "Rolling 12-2", I should be able to see
last 12 months of my data but excluding the latest 2 months. E.g If I'm in January 2018 then I should be able to see data excluding Jan 18 and Dec 17 (from Jan 17 to Nov 17). I have tried some techniques but without success. Can anyone help. Thanks.
Reference Tableau Workbook attached at link :
Using the Superstore sample data (I don't have 10.5 installed), I created the following boolean expression which you'd put in the filter shelf for True.
Give a parameter called rolling, create calc field as follows:
if [rolling] = 'Rolling 12'
then DATEDIFF('month',[Order Date],{max([Order Date])}) < 12
ELSEIF [rolling] = 'Rolling 12-2'
then DATEDIFF('month',[Order Date],{max([Order Date])}) < 12
and DATEDIFF('month',[Order Date],{max([Order Date])}) >= 2
end
Adjust the date name for your date field.
I'm new to Tableau. I have a customer-event table to show which customers attended which events (like webinars, etc). One of fields is sales - which is the sales for that customer 30 days from the date of the event.
custid eventid eventdt 30daysales
1 aa jan 1 $100
1 ab jan 1 $100
2 aa jan 2 $150
Note that customer 1 attended 2 events on the same day. So the sales number is duplicated. If I were building a report for a single event, it's no problem. But when I build a monthly report, I want sum(Sales) = $250 and not $350.
My report sample:
Month eventcount customercount 30daysales
Jan 2 2 $250
With tableau 9, I read that using an LOD formula would allow me to sum sales on a per customer basis. But I'm on Tableau 8.3 and I'm wondering what the manual workaround is.
How do I write the calculated field to compute the 30daysales without duplicating?
I have some data in table SSTemp like this ("..." indicates data omitted for readability):
Month Year Number Gross Net
1 2013 1 1,000 500
2 2013 1 1,000 500
...
12 2013 1 1,000 500
1 2014 1 1,000 500
2 2014 1 1,000 500
...
12 2014 1 1,000 500
1 2015 1 1,000 500
...
12 2015 1 1,000 500
I am new to Crystal Reports and am using version 8 (no, we can't upgrade). I want to roll up the totals for all line items in years past and leave the data as-is for the current year in the same report. Database field {CONTROLFILE.CURRENTYEAR} contains the current bookkeeping year for our system which is vital to determine the rollup groups. The CONTROLFILE table contains general settings for the system and has no data in it useful for JOINing, however I need to consider CURRENTYEAR for the grouping. The MONTH column should be blank on the summary lines, and indicate month on the current year lines. The end result data should look like this:
Month Year Number Gross Net
2013 12 12,000 6,000
2014 12 12,000 6,000
1 2015 1 1,000 500
2 2015 1 1,000 500
...
12 2015 1 1,000 500
Any suggestions would be most appreciated!
Use sub report concept.
In main report calculate for previous years in sub report calculate for current year.
In main report group by year And suppress details show summary in group footer in another group footer section place sub report and just place data in detail part don't group
How to find group wise total(Sum) in SAP crystal report?
Dear All,
I have to find the Sum of value based on the Date(01/01/2014……) And Regional (North,West,East,Central) wise….But 2014,2013 column data type varchar(25)
Here I will give little Example of what I want to do:
Date Regional StationName 2014 2013
01/01/14 North AAA 1000.00 100.20
01/01/14 North BBB 500.00 50.00
1500.00 150.2
01/01/14 West ZZZ 100.00 00.00
01/01/14 West YYY 500.00 10.00
600.00 10.00
Grand Total :2100.00 160.2
to get that done you will have to create 2 groups, one by Date(suppressed) and another by Regional where you are going to place all of your fields. Then crate to formulas, one for 2014 and another for 2013 columns to convert those strings to number using tonumber() function. For example tonumber(2014). Then you will have to summarize 2014 and 2013 based on Regional Group and grand totals for both as well.