Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Show next 21 month sales

if i select the 2013  jan mean i want to show next 21 month sales values in line chart

13 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

can you attach a screenshot of your script or attach sample source file

stephenedberkg
Creator II
Creator II
Author

Dear Jonathan Penulier,

SupplyPlan:

LOAD  SupplyID,

    ChildID,

    //LITM,

    //BusinessUnitID,

   // MarketID,

    //ProductGroupID,

   // SourceID,

    //month,

    //year,

    //ForMonth,

    //ForYear,

     Month(AddMonths(Today(),21)) as TransactionDate,( this is used in master calender)

    Submitted,

    GroupID;

SQL SELECT *

FROM "Genesis_Reports".dbo."tbl_supply";

Left join(SupplyPlan)

SupplyPlanDetails:

LOAD ID,

    SupplyID,

    //LITM,

    //Year,

   // Month,

    OpeningStock,

    ClosingStock,

    StockCoverDays,      

    PrimarySales,

    SecondarySales,

    //FCL,

    Palletized;

SQL SELECT *

FROM "Genesis_Reports".dbo."tbl_supplydetails";

jpenuliar
Partner - Specialist III
Partner - Specialist III

Can you attached your qvw file,

jpenuliar
Partner - Specialist III
Partner - Specialist III

at this point, I wouldn't want to touch your script, as i believe we have moved away from your original post, that is to Sum Sales in a Line based on a 21 month range. earlier, ive given you an example,

          Example: StartDate = Today()

                    EndDate = Month(AddMonths(Today(),21))

In this case, StartDate can be your selected month(you can pull this from your Master Calendar).

You only need to add 21 months from your StartDate , and to be able to use these Date Range(StartDate and EndDate) to compute your Sales.