Cumulative sales

Hi all

This is my first post here, fought with this for two weeks now and tried all kinds of google searches, that nothing worked properly.

For some reason:
To date ("fact_sales". "line", "dim_date" "." " YEAR')

Does not give the right amount.

I was able to get the values combined with the total of the year for the current day and time, but the problem is I need the numbers cumulative for the selected year and up to the month selected, the user sets (I got the year and month on Table Promts).

MSUM ("fact_sales". "' line ', 'dim_time '. ("" MONTH ")

I tried the MSUM above, but I get the error message:

The formula syntax is not valid.

[nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 42025] The value of N to TopN, view, Macrocrania and NTile must be a constant. (HY000)

If I can replace static whole MONTH as 8 (August), it works very well and gets the accumulated value since the beginning of the year until August.

Any suggestions? have tried this on both server and browser while making analysis
(error on the server side: [nQSError: 42025] the value of N for TopN view, Macrocrania, and NTile must be a constant.)

Thanks in advance

Edit:

Actually just realised that MSUM does not work properly either as it takes the sum of the current month and then of course amount integer return

For example MSUM (sales, 2) would now take only August and September.

I have it sole with view table and addition of filter Assembly.

First thing I did was I went to the view table editing and from there, I moved 'Months' of the guest Table to excluded and the addition of filter with 'Year' = 'Remote' and 'months '.<= "thismonth"="" and="" then="" i="" was="" able="" to="" get="" cumulative="" numbers="">

Tags: Business Intelligence

Similar Questions

  • cumulative sal

    Hello

    I'm new on OTN. This is my first question.

    I have to run a report with the AMT can be combined. If you can provide with the emp table, then I can implement logic with my table accordingly. But without analytical functions... I have to post.


    Need your valuable help

    Rekha

    Hello

    Welcome to OTN.

    Try like this...!

    select e1.empno, e1.ename, e1.sal,
                                                       (select sum(sal)
                                                         from emp e2
                                                         where e2.empno <= e1.empno )  AS cume_salary
                                                            from emp e1 order by empno
    

    KPR

  • Calculate sales Accumalated

    Hello world

    Could someone suggest me how to calculate total sales. The scenario is

    My Table is like this

    Cardno sales accumulated sales
    101 100 100
    102 80 180
    103 20 200


    I need to calculate the third column "Accumulated Sales" from column 2 "sales".

    is there a formula in oracle to calculate cumulative sales? How did I need form the SQL for this requirement? Can anyone help?

    Thanks in advance

    Concerning
    select
    Cardno,
     Sales,
     sum(Sales) over(order by rownum) as "Accumulated Sales"
    from your_table
    
  • Cumulative total for each day - how to deal with nulls

    I'm on 11.2.0.3.  I want to write a query to calculate a running total of the incidents a day - this request will be used for an APEX line chart.


    Sample table and data:

    create table sales (
      id number primary key,
      time_of_sale date,
      item varchar2(20));
    
    
    insert into sales values (1, to_date('02-JAN-2013','DD-MON-YYYY'), 'book');
    insert into sales values (2, to_date('03-JAN-2013','DD-MON-YYYY'), 'candle');
    insert into sales values (3, to_date('05-JAN-2013','DD-MON-YYYY'), 'bicycle');
    insert into sales values (4, to_date('05-JAN-2013','DD-MON-YYYY'), 'football');
    insert into sales values (5, to_date('07-JAN-2013','DD-MON-YYYY'), 'football');
    insert into sales values (6, to_date('10-JAN-2013','DD-MON-YYYY'), 'elephant');
    insert into sales values (7, to_date('10-JAN-2013','DD-MON-YYYY'), 'turtle');
    insert into sales values (8, to_date('10-JAN-2013','DD-MON-YYYY'), 'book');
    insert into sales values (9, to_date('10-JAN-2013','DD-MON-YYYY'), 'candle');
    insert into sales values (10, to_date('10-JAN-2013','DD-MON-YYYY'), 'bicycle');
    commit;
    

    For each of the days between 1 January and 10 Jan I want to get the total functioning of the number of sales.

    So the output l would like is:

    DAY ITEMS_PER_DAY

    --------- -------------

    1ST JANUARY 13 0

    JANUARY 2, 13 1

    JANUARY 3, 13 2

    JANUARY 4, 13 2

    5 JANUARY 13 4

    JANUARY 6, 13 4

    JANUARY 7, 13 5

    JANUARY 8, 13 5

    JANUARY 9, 13 5

    10 JANUARY 13 10

    So even if there is no sale on January 4, we show the total of the previous day.

    If I can create a series of dates using the:

    select trunc((to_date('01-JAN-2013','DD-MON-YYYY')-1) + rownum) day 
    from dual 
    connect by rownum <= 10
    

    And I can't the cumulative aid total:

    select trunc(time_of_sale) as day, sum(count(*)) over (order by trunc(time_of_sale)) as items_per_day
    from sales
    group by trunc(time_of_sale)
    

    Overall, it gives me:

    SQL > select

    2 a.day as the day,

    3 b.items_per_day

    4 of

    5 (select trunc((to_date('01-JAN-2013','DD-MON-YYYY')-1) + rownum) as day

    6 double

    7 plug by rownum < = 10).

    8 (select trunc (time_of_sale) day, sum (count (*)) (trunc (time_of_sale) order) as items_per_day

    9 sales

    10 group by trunc (time_of_sale)) b

    11 where a.day = b.day [+] - replace by parentheses to avoid the formatting of the forum

    12 order by a.day

    13.

    DAY ITEMS_PER_DAY

    --------- -------------

    1st January 13 null

    JANUARY 2, 13 1

    JANUARY 3, 13 2

    Value null 4 January 13

    5 JANUARY 13 4

    Value null January 6, 13

    JANUARY 7, 13 5

    Value null January 8, 13

    Value null January 9, 13

    10 JANUARY 13 10

    It's not exactly what I'm looking for.  I played a bit with a lag, but had no success.

    Any ideas?

    Thank you

    John

    Hi, John,.

    You want to do the SUM after the outer join, like this:

    WITH days_wanted AS

    (

    SELECT TO_DATE (January 1, 2013 ', 'DD-MON-YYYY') + ROWNUM - 1 day YOU

    OF the double

    CONNECT BY ROWNUM<=>

    )

    SELECT d.day

    SUM (COUNT (s.id)) OVER (ORDER BY d.day) AS items_to_date

    OF days_wanted d

    S sale LEFT OUTER JOIN ON TRUNC (s.time_of_sale) = d.day

    GROUP BY d.day

    ORDER BY d.day

    ;

    Note that we must use COUNT (s.id) instead of COUNT (*) here, because, given that it is evaluated once the outer join, COUNT (*) would be taken into account less than $ 1 a day, because the outer join ensures there will be at least 1 row in the game for each row in days_wanted, whether or not it matches anything in sales.

    It wouldn't work using the old join syntax, too, but I suggest to use the ANSI syntax, especially for outer joins.  It reduces the amount and the complexity of the coding, and which allows to reduce the number of errors.  (Also, it avoids the problem of the display of this site.)

  • Get the cumulative values in a single column based on another column in reports

    Hi all

    I have a requirement to get cumulative values based on another column.
    I 'Sales rep name' in the first column.
    Correspondent "Values of the invoice line" in the second column.
    Want to have cumulative of all the values for each sales invoice line.
    Then apply rank and display the top 10 sales reps based on invoice lines.
    Since there is no rank option in the PivotTable, I do this in the report table.

    Looking for the best entries...

    Thanks in advance...

    Try below
    2nd column: "name of Sales rep.
    column 2: SUM ("invoice line values ' BY 'Name of Sales rep'") and sort this field desc.
    3rd column: fx RANK (SUM ("invoice line values" BY "Sales rep name")), to hide this column, so that you don't confuse your users.

    and put the filter on the 3rd column below 5

    I hope this works for you

  • Commission on track based on the number of sales

    I got a new job (yay!) and I'm trying to follow my commissions. I am paid by a combination of production and the number of sales that I produce. Here is a small picture to show what I mean.

    Number of sales

    Payout rate

    1

    6%

    2

    7%

    3

    8%

    4

    9%

    5

    10%

    6

    11%

    7

    12%

    8

    13%

    Let's say that each sale, the customer pays $2,000 to keep things simple. The first sale, I would win $120, the second sale I now would get $140 for each because it is retroactive (does sense?) without the hat. How would actually follow it in numbers? Thanks in advance!

    This may work for you:

    the first line of the two tables is a header row

    them 4 last lines of the table 'sales' on the right are the lines of footer

    (The first line of the footer) B8 contains the formula:

    = SUM (B)

    shorthand is

    B8 = SUM (B)

    B9 = MIN (COUNTA (A), COUNTA (B))

    B10 = VLOOKUP (B9, sales bonus::A:B, 2, 0)

    B11 = B8 × B10

  • 42.0 Firefox fails to load images of points of sale in ebay.co.uk

    Since the update Firefox 42.0, loading but ebay pages without pictures of the items for sale. Safari loads normally (on Mac 10.6.8).

    It seems HTTPS everywhere was the culprit. Maybe if I just upgrade my OS X 10.6.8 who will deal with it also. Thanks again Fred.

  • Can't use my iPhone to write a book for sale on iTunes or an iBook

    For some reason, I thought I saw somewhere that you can use your device Weatherby iPhone Apple iPad for writing and do a book, and then apply it on iTunes or I book for sale...  So is it possible or there at - there an app for that... ?

    Here is the information from Apple:

    author iBooks: iBooks Store publication view

    Publish and sell books with author - Support Apple iBooks

  • Sale of adblock for unknown buyer has an effect on Adblock Plus?

    Sale of adblock for unknown buyer has an effect on Adblock Plus?

    No, AdBlock Plus is a completely different extension.

  • Imac for sale and can not reinstall OS without using my id

    I am preparing my old imac for sale and erased the hard disk by following the instructions, and I try to reinstall the factory operating system without having to use my apple i.d. but when I boot using R-command-option, I get the spinny globe and then the thing saying that he made the restoration of the internet, but then it gets to the screen white/grey apple and just gets stuck.  (For more than 2 hours, so STUCK).  Ideas?

    It may be interesting to create a flash drive with the installer of the OS, in this way, you don't need us the recovery partition or restore from the internet.

    http://osxdaily.com/2015/09/30/create-OS-x-El-Capitan-boot-install-drive/

    These use a small tool to have anyway.

  • What do need me for when the sale of an iPhone that won't turn on in order to remove my information?

    What do need me for when the sale of an iPhone that won't turn on in order to remove my information?

    If it lights why if someone buy it?

  • MozillaFirefoxStartPage this domain is for sale! When I go to my beloved Firefox is what I see.

    IKNOW there are some redirect there, freaky virus but I tried the best of the best scans and no one saw anything. I was told to try ESET online, I think it was, they found so much, I got rid of the desktop black and got my themes all back, but when I go to Firefox, I get a generic page saying ffstartpage and this domain is for sale and various ad things and looking for the man. After the crazy ESET run, as more than 5 hours, he has tried to force himself on me like yahoo, then back in, http://www.findingresult.com/?dn=mozillafirefoxstartpage.com & PID = 9POL8D55D. Somewhere spoke of the place to get information about themselves on the address bar, so I clicked and a fridge of info came, so I blocked everything that he and FF settings and options in internet. Now that information placed on the address under 'media' bar he registered the address cur.cursors-4u.net/smileys/smi-3/smi242.cur. () no idea why, just one thing FYI). Under "cookies" for today and I wasn't much at all and they are blocked, and he showed no cookie, he says he left the cookies with me 28 times. When I do a search timeanddate, it is said he finds nothing, and it's a joke, so I keep hitting to try again until it makes me qrobes stuff. Today, I got a black page saying server could not be found, like who is mozilla firefox? Guys, Im dyin here! It took me days to get to this place of observation, Im like nobody else got this shit but me? Please help me out if you can, or direct me to a worm/virus/malware company I can work with. Having trouble finding where I can explain in detail like that. Thank you so much for your time in reading this. Hope you can help! Oh, Windows 7 64-bit office. I ran: Emisoft anti-malware Malwarebytes, ThreatExpertMemory Scanner, Hitman Pro, SuperAntispyware Free, Rising Antivirus, Malwarebytes Antirootkit, removal of Virus from Sophos, ADW, tool Rkill, Malwarebytes Anti-exploit and own TrendMicro BrowserGuard, these last 2 run all the time now. They have been run one after that the other and some double in a period of 3 days. Sometimes, I do not SLEEP.

    Set your start page for Firefox that starts desired page or a blank page.
    https://support.Mozilla.org/en-us/KB/how%20To%20set%20The%20home%20page

    For more information on see malware problems
    https://support.Mozilla.org/en-us/KB/troubleshoot-Firefox-issues-caused-malware

  • Can fix you this problem... no text cursor is available in the description box for step 4 from the sale of eBay.co.uk

    I use XP Pro SP3 + Firefox 16.0.2
    Since yesterday, trying to sell an item on eBay.co.uk, no text cursor is available in the description for step 4 box, is not possible to enter text.
    However, text can be entered in all the other text boxes on the sales page.

    For comparison, using Internet Explorer 7, the text can be entered in this text box.

    Hello. Thanks for this direction. Problem turned out to be coming through "Elegant". A style to remove ads from eBay has proved to be the root of the problem, and eBay has been fully functional as soon as I disabled the style.
    I really liked this style... think I'll keep it for viewing and clear to sell! Elegant, which is easy using the toolbar in the Firefox Add-on.
    Byee
    Norm

  • ITunes sales tax

    How much tax is an album for $ 9.99 on iTunes in North Carolina?

    You can search your online sales tax rate as easily as everyone

  • I have received spam by using Firefox as my browser of Fed Ex; He was carrying a virus; instantly, a protection of $89.99 plan was forced on me; you do not like that of sales.

    I have Kapersky Antivirus and that you don't need to spend $89.99 on some program promotes Mozilla. First of all, I do not expect spam to Fed Ex and should not open the email (which looked authentic and I order with Fed Ex delivery); However, your loop kept taking me back to the sale of high pressure of your antivirus shield program. Although I found that electronic mail has been contaminated, but please, not high pressure sales or scared. My own program handled for me.

    Firefox has nothing to do with your email or you may have received spam. Firefox is just a browser you use to access your email (Email is managed by people like AOL, Gmail, etc..). And if you have received an email trying to sell you software, which came from a third party who is spamming.

    Shield anti-virus sounds like it may be part of a family of rogue anti-virus. http://en.wikipedia.org/wiki/Rogue_security_software. Thus, it seems that you might have an infection on your computer if you installed this program. In addition, if you have provided your credit card for the anti-virus, the integrity of your credit card number is at stake.

    Firefox to solve the problems caused by malware provides resources that you can use to help eradicate this virus.

Maybe you are looking for