Home Forums SQL Server 2014 Development - SQL Server 2014 loop and query CSV files in a folder using union all query to form resultant table on server RE: loop and query CSV files in a folder using union all query to form resultant table on server

  • sifar786 (7/6/2014)


    [font="Verdana"]Hi,

    Outputs: dropdown Filters are on Country Category, Manufacturer, Brand and aggregation done after applying each such filter.

    Select:

    Your CountrySPAIN

    Your CategoryJUICES

    Your ManufacturerA.J. BARD

    Your BrandRUBICON

    Calculations:

    Data is grabbed from ItemWeekWise table

    Country

    Count the number of SKUs in the country with more than 13 weeks of data

    For the selected week x compute cumulative values for below KPIs for each of the SKU in the country:

    1. Sales Value with Innovation

    2. Sales Units with Innovation

    3. Weighted Distribution

    Based on the above data calculate for each SKU:

    4.Values Sales Velocity =Cumulative Sales Value with Innovation/ Cumulative Weighted Distribution

    5.Unit Sales Velocity=Cumulative Sales Units with Innovation/ Cumulative Weighted Distribution

    "Find the below percentiles for each of the above 5 KPIs

    90

    50

    10"

    "Find the percent rank of the below values using the cumulative array for the respective KPI:

    Cumulative Value Sales (entered by the user)

    Cumulative Unit Sales (entered by the user)

    Weighted Distribution (entered by the user)

    Values Sales Velocity (entered by the user)

    Unit Sales Velocity (entered by the user)"

    [/font]

    do have an example of the output you are looking to provide?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day