+ Reply to Thread
Results 1 to 3 of 3

dynamic pivot on months

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    dynamic pivot on months

    Aim –

    to get the last three months sales figures, from the date the report has been run, and put the the figures in separate columns associated with months.then provide a flag to give me indiciation if the sales amount has decreased by 10% within those 3months

    The table which i am using is

    SELECT TOP 1000 [hst_merchnum]
    ,[hst_date_processed]
    ,[hst_sales_amt]
    FROM [FDMS].[dbo].[Fact_Financial_History]


    [hst_merchnum] =
    [hst_date_processed] =date of transactions, date is listed as 20120101 (y,m,d)
    hst_sales_amt] = sales amount


    I would need columns created so i can show last 3months hst_sales_amt from point of report

    For eg – ran report in march

    layout

    hst_Merchantnum, Jan , Feb, march,
    001 £1000 , £2000, £5000

    eg 2) – ran report in august
    hst_Merchantnum, June, july, August,
    002 £1000 , £2000, £5000

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: dynamic pivot on months

    You get better help if you post an Excel-example of your workbook, without confidential information.

    Make sure the workbook demonstrates your desired results if possible, or just highlight the cells you're trying to fix.

    Use BEFORE/AFTER sheets if that helps make it clearer.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: dynamic pivot on months

    hi oeldere, this is a sql query, i posted this question in the wrong forum

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1