Average Daily Sales-Calc
I am trying to create a member calc on an account. The account is Average daily sales. I want to average my sales for Level zero of time only for 42 days. The calendar day is my lev 0 of time. The problem I am running into is my calc is dynamic and takes forever to pull in Excel. CalcAvgsales=IF (@ISLEV(Time, 0)) @AVGRANGE (Skipnone,Sales, @CURRMBRRANGE (Time,Lev,0,-41,0)); ELSE #Missing; ENDIFI would like to make this account stored but not sum up the lev 0 of time to lev 1 for the average daily sales account.
This calc could be stored but if you did so, it would be easier to do it in a calc script as you have to consider calculation order problems.Something like this should work although is not tested (hoping essbase.com won't mess up formatting too much)... Calc All; (or whatever calc to ensure Sales is calculated at all levels)Set updatecalc off;"Average Sales"(if(@islev(Period,0))@AVGRANGE (Skipnone,Sales, @CURRMBRRANGE (Period,Lev,0,-5,0));else#missing;endif)Hope this helps.
Similar Messages
-
Daily sales outstanding report
Hi Friends,
Client has requested a Daily Sales Outstanding(DSO) Analysis Report to be generated each month which should measure the average number of days a company takes to collect receivables after a sale is made.
Does SAP have any standard report for this, if not please guide me what should I do to get above requirement.
ThanksThe balance and the sales have been determined from table KNC1.However, this table is not updated per credit control area.
When one company code is associated with more than one credit control area, there are possibilities of errors coming in DSO, in some old releases.
OSS note 885637 may be relevant.
Function modules CUSTOMER_DSO_CALCULATION, CUSTOMER_DSO_EXPLANATION could be used in this calculation.
DSO days
The number of the days the customer took to clear an invoice is calculated as the DSO days,(the balances are set against the sales). The DSO days are calculated with the following formula:
DSO = Balance/sales per period x 30
DSO calculation: Number of posting periods to be included
The number of months to be taken into account determines how many previous months must be included when calculating the balance and sales per day.
<b>Customizing controls</b>
In customizing, SPRO>Financial Accounting>Accounts Receivable and Accounts Payable>Credit Management>Define Preliminary settings for credit management.
The day sales outstanding figure is normally calculated in the standard system using a 3 month period.
DSO Calculation with current balance or average of 3 months balance are set up in configuration. -
Want the Average of sales for months up to date, with empty months included
How do I create an MDX that gives me the average of , f.ex., Sales
Note that some months may not have sales, but the month should still be counted.
The result I want to get out is a listing of Years with average of Sales for each year. Where current year only calculates up to current month.
Lets say that todays month is 2014-05 and we have the following figures for this year.
Month Sales
2014-01 10
2014-02 20
2014-03 Null
2014-04 15
2014-05 10
The calculation should be Sum(Sales) divided by 5 months: 55/5 = 11
If I use:
Avg( Descendants([Date].[Calendar].[Month].CurrentMemeber
, [Date].[Calendar].[Month])
, [Measures].[Internet Sales]
It will exclude 2014-03, which is wrong!
If I use CoalesceEmpty() to fill in the Nulls:
Avg( Descendants([Date].[Calendar].[Month].CurrentMemeber
, [Date].[Calendar].[Month])
, CoalesceEmpty([Measures].[Internet Sales],0)
It will fill in 0 for all months 2014 (up to 2014-12), which is also wrong!
It feels like a really simple calculation, but I can't make it work.
ThanksI finally had to fix it by checking the number of months to get it right.
This solved my problem and gave me the correct averages on year and month level.
Create Member CurrentCube.[Measures].[COMPLAINT COUNT AVG CALC] As Null
,Format_String = ";;;\N\/\A",VISIBLE = 1;
// For Year level - Show average of year = Sum/NumOfMonth. If this year then up to this month else divide by 12
SCOPE([COMP CREATION DATE].[YEAR].[YEAR], [Measures].[COMPLAINT COUNT AVG CALC]);
This = IIF([COMP CREATION DATE].[IS THIS YEAR].&[Y],
DIVIDE(SUM([COMPLAINT Count]), Format(now(), "MM")),
DIVIDE(SUM([COMPLAINT Count]), 12)
Format_String(This)="# ### ##0";
NON_EMPTY_BEHAVIOR(This) = { [Measures].[COMPLAINT Count] };
END SCOPE;
// For month level - Show average of month = Sum/NumOfDaysInMonth
SCOPE( [COMP CREATION DATE].[Year-Month-Date].[YEAR MONTHNO], [Measures].[COMPLAINT COUNT AVG CALC]);
This = IIF(not isempty([Measures].[COMPLAINT Count]),
Avg(
Descendants(
[COMP CREATION DATE].[Year-Month-Date].CurrentMember,
[COMP CREATION DATE].[Year-Month-Date].[DATE ID]
CoalesceEmpty([Measures].[COMPLAINT Count],0)
,Null
Format_String(This)="# ### ##0";
NON_EMPTY_BEHAVIOR(This) = { [Measures].[COMPLAINT Count] };
END SCOPE;
mStenport -
Acrobat Pro 6 Average Daily Production and Math.round problem
Acrobat Pro 6 Average Daily Production and Math.round problem
(Production.0) (154) (whole units) . (Production.1) (90) (fractional) / (divided by) 31 (days) results in (Average.0) (4)(whole units) . (Average.1) (10) (fractional) using :Math.round.� Noticed that 154 (whole units) . 85 through 99 (fractional) also show 4.10. (without Math.round : 5.00)
Method:
�Production.0� (whole units) . �Production .1� (fractional) / Days = (Average Daily Production) (�Average.0� (whole units) . (Average.1) (fractional)
� Production.0 (value not calculated)�, � Production 1 (calculated) (event.value = util.printx("0099", (event.value)).substr(-2,2); � �Average.0 (value not calculate)�, and �Average.1 has following calculation:
var punits = this.getField("Production.0");
var pfrac = this.getField("Production.1");
var average = 0.0;
average = (punits.value + pfrac.value / 100) / this.getField("Days").value;
this.getField("Average.0").value = average - average % 1;
this.getField("Average.1").value = util.printx("0099", Math.round((average % 1 * 100))).substr(-2,2);
�Math.round� appears to be a problem. Also, could you explain the purpose of �0099� . Anyway, why would 154.85 through 154.90 divided by 31 give 4,10. Also, their must be a better way, to find the average daily production. All you have to do is divided the production (whole. fractional) by the days, and display the average daily production as (whole. fractional). Any suggestions??There are a many loose ends in your question.
First, I have never seen before a variable type called 'var'. Is it a java primitive or a class?
Next, I cannot seem to find any class that has the printx method.
When it comes to substr(-2,2), I get confused. First, I thought that it was a method of the String class, but I only got as far as substring(beginIndex, endIndex).
If you really must break the production and average into pieces, try this:
float average = (punits + pfrac/100) / days;
int avg_units = (int)average;
int avg_frac = (int)( (average - avg_units) * 100 );My guess is that util.printx("0099", x) formats x having two optional digits and two mandatory digits, showing 0-99 as 00-99, but allows to show numbers with three and four digits.
154.85/31 = 4,9951612903225806451612903225806
154.99/31= 4,9996774193548387096774193548387
If you round the fraction of theese numbers multiplied by 100 ( = 99.51.. and 99.968...) you get 100, and this will be the output of printx. My guess for "4.10" is that substr(-2,2) returns the two first characters of the string, because the start index should not be zero. (According to java docs, substring throws an exception on a negative index, so what kind of class are you really using ??????) -
Query for daily sales by warehouse
Hi
I need a query for Daily sales by warehouse. I am only new to this and struggling with generating.
ideally it will look like the below. With no selection criteria as I would like to schedule the report to email out at the end of each day.
Warehouse Revenue GP GP%
NSW $xxxx $xxx 35%
Would someone mind helping
thanksthankyou , But i have multiple warehouse and i dont want to use a selection criteria.
to expand on the original example
Warehouse Revenue GP GP%
NSW $xxxx $xxx 35%
QLD $xxx $xx 32%
VIC $xxx $xx 32%
Also the results should only show figures for the day the query is executed
Any help is appreciated.
Similar layout to this,except using query and whs code. the below is generated using sales analysis and customer group. -
No Daily Sales/Trend Report for today?
Has anyone received your iTunes Connect Daily Sales/Trend Report for today (1/25/10)? I have not received mine yet. First time it hasn't been up at this hour.
It usually arrives at 2:30am (it's 9:30am here now) or if it's delayed, usually in another region, there's a note in big red text on the reports page.As I recall (back when I only had a few apps just starting in the store), yes, no daily sales means no daily report. Wait for the weekly report to confirm.
-
Daily sales by month and cumulative sales for year
Hi Experts,
I have a reporting requirement where I have to show daily sales by month and cumulative daily sales for particular month for the year.
e.g. If the current month is January then my result shows fine. see below
Calendar Day
Net Sales
Target
Sales Year
Actual
Target
01/01/2014
100
90
01/01/2014
100
90
02/01/2014
200
180
02/01/2014
300
270
03/01/2014
300
290
03/01/2014
600
560
04/01/2014
400
350
04/01/2014
1000
910
But If I am in the month of Feb and I want to show sales for the month and cumulative sales for the year for just Feb but instead of showing cumulative total from 01/01/2014 to end of Feb it starts again at begining of Feb - See below
e.g.
Calendar Day
Net Sales
Target
Sales Year
Actual
Target
01/02/2014
200
190
01/02/2014
200
190
02/02/2014
400
380
02/02/2014
600
570
03/02/2014
600
590
03/02/2014
1200
1160
04/02/2014
800
750
04/02/2014
2000
1910
Expected Result - sales for the year shoud show cumulative result from 01/01/2014 - 31/12/2014
Calendar Day
Net Sales
Target
Sales Year
Actual
Target
01/02/2014
200
190
01/02/2014
1200
1100
02/02/2014
400
380
02/02/2014
1600
1480
03/02/2014
600
590
03/02/2014
2200
2070
04/02/2014
800
750
04/02/2014
3000
2820
How do I achive this?
please help.What else you need?
looks like you got #working days for the month, use that metric as of jan 15th -
Report on daily sale,stock availability,pending order,Ageing report
Report on
daily sale for time period
stock availability
pending order
Ageing reportDear Goutam
Through VF05, you can see sales daily.
For stock MMBE
For Pending Order, VA05
Thanks
G. Lakshmipathi -
ORBO - Daily sales report includes Order Init Transaction?
Hi All,
Can you please any one guide me in ORBO application,the daily sales report includes the Order init transaction details?
Appreciate your help.
Hari.Oracle Retail application doesn't consider Sale of Item which has not been moved out from the store and in other words all the orders , layaway ,special orders Initiated considers will not be accounted as sale amount despite of retailer has received amount in advance( Item inventory get reserved for those transaction ) .Transaction amount of those transaction will be added in sale of the particular day when those transaction will get completed i.e. Item inventory ( SOH) get down .
I hope i have answered your question. Please let me know if further information required
Thanks
Himanshu Lohani
[email protected] -
Daily Sales Total Comparison Query
Hi Experts,
I'm trying to make a query to get daily sales total for week and wish to make a graph.
However, if there is no figures in credit note or Down payment invoice or invoice then query seems not showing any figures for particular date.
I would be appreciated if anyone help this.
SELECT DISTINCT
GetDate(),
SUM (DISTINCT T0.DocTotal) AS 'Daily INV Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE DateDiff(D,T0.DocDate,GetDate())=0 AND DateDiff(D,T1.DocDate,GetDate())=0 AND DateDiff(D,T2.DocDate,GetDate())=0
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 1, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 1, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 1, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 1, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 2, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 2, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 2, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 2, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 3, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 3, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 3, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 3, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 4, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 4, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 4, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 4, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 5, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 5, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 5, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 5, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 6, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 6, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 6, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 6, 0))
UNION ALL
SELECT
DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 7, 0)),
SUM (DISTINCT T0.DocTotal) AS 'Daily Sales Sum',
SUM (DISTINCT T2.DocTotal) AS 'Daily DT INV Sum',
SUM (DISTINCT T1.DocTotal*-1) AS 'Daily CR Sum',
SUM (DISTINCT T0.DocTotal) + SUM (DISTINCT T2.DocTotal) - SUM (DISTINCT T1.DocTotal) AS 'Daily Sales Total'
FROM OINV T0, ORIN T1, ODPI T2
WHERE T0.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 7, 0)) AND T1.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 7, 0)) AND T2.DocDate = DATEADD(dd, 0, DATEADD(dd, DATEDIFF(dd, 0, GetDate()) - 7, 0))Could you let me know how to make pivot query?
AR INV TOTAL | AR Down Payment Total | AR Credit Total | (AR INV TOTAL+AR DP TOTAL-AR CREDIT TOTAL)
Today's Sales
Yesterday
Until Week Before -
Hi Guru,
My SAP version is 4.5B. I would like to check is there any standard SAP program I can use to generate Average Daily Balance(ADB) in this version ?
Hope to hear from you.
Regards
Andrew TayHi,
Average Daily Balance Report is not available in SAP standard. If you want to create one more new report then
create a Function Specification for the selection screen and output screen. Collect all the fields details with table name and mention the logic of the report and give it to ABAPER so that he/she can write a Technical Specification on the basis of
your Functional Specification.
Thanks & Regards
R.K -
Hi All,
I have a requirement to build a daily sales report (Revenues & Cost) Report:
Upon analysis of the Input and output layouts, i concluded that all the charateristics & Keyfigures are present in the COPA dsrc,, but except one Characteristcs called "Discount Group" is not there in the COPA DSrc.
As per my knowledge ,if i want to enhance the COPA Dscrc, i shud enhance the Operating concern or the structure of CE1XXXX Table
Can any1 tell me how to enhance the COPA DScrs Extract structure with this Discount group field?
The enhancement must be based on Sales order Number and its Item.
Thanks and Regardsehanced the COPA Extraction Structure
-
Daily sales report with last selling price
Dear All,
how to query daily sales record with last selling price as following:
cust. code , item , unit price, last selling price to this cust. within 3 month , highest selling price of this item with 3months
I'm new to both SAP and SQL, Please help! Many Thanks!!
WingHi,
Try this........
SELECT P.CardCode,P.CardName,P.ItemCode,
[1] as [Jan],
[2] as [Feb],
[3] as [Mar],
[4] as [Apr],
[5] as [May],
[6] as [Jun],
[7] as [Jul],
[8] as [Aug],
[9] as [Sep],
[10] as [Oct],
[11] as [Nov],
[12] as [Dec]
FROM (SELECT (T0.CardCode),T0.CardName,t1.ItemCode,T1.price,MONTH(T1.Docdate)as month
FROM dbo.OINV T0
inner join INV1 T1 ON T0.DocEntry=T1.DocEntry
inner join OITM t2 on T1.ItemCode=t2.ItemCode
WHERE T1.DocDate>='[%0]' and T1.DocDate<='[%1]' and T1.ITEMCODE='[%2]'
and T0.CardCode='[%3]'
) S
PIVOT (max(price) FOR [month] IN
([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
ORDER BY P.[CardCode]
Check this link for SQL tutorials.........
http://beginner-sql-tutorial.com/sql-subquery.htm
http://w3schools.com/sql/default.asp -
Daily sales(qty of material delivered to cutomer)
How can i get daily sales(qty of material delivered) for last one year.
Regards,
vivekDear Vivek
If you want cumulative value, you can run MC+E. If you want break up details, the standard TCode is VF05.
Alternatively, you can also use SE16 and give table VBRP so that the system will generate the despatch details made.
thanks
G. Lakshmipathi -
Daily Sales reports - $0 price items
In the daily sales reports, I'm getting some rows showing $0 customer price and royalty price. These are for paid, not free apps. It shows a product type identifier of 7 (instead of the usual 1).
What does this mean ?
Anyone else getting these ?Never mind.
I just realized that these are the no-charge update numbers.
Maybe you are looking for
-
I have a G4 that I've recently installed OS X Server on. However, I've been having random network failures. I simply detach the enet cable and reattach to regain my connection. I opened network utility and here's some stuff I found. Sent Packets: 115
-
How to encrypt the drive/folder in mountain lion
My air has upgraded to Mountain Lion, however, i can't seem to see the encrypt option from the contestual menu in Finder? Thanks
-
hello all, I need some basic help and info on jasper. if some one has used it and used it specially with swing, please let me know. I need some basic concepts of jasper. 1: can I send the reports to the printer directly? i mean, is there a class in j
-
Quick Poll With Anonymous User
Hi All, Does Quick poll of enterprise portal works with anonymous user. Can anybody suggest me a nice approach for quick poll for anonymous users. Thanks Sarang
-
Illustrator files opening as Preview
Hi, I just updated to the Snow Leopard operating system on my mac, and all of a sudden when I click on an Illustrator file, I get a preview...it doesn't open thru Illustrator. How can I fix this? Thanks!