Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
guillaume_gorli
Creator II
Creator II

Date issue

Hi All,

Please see below the issue i am facing :

I have a test database with :

Date

Part Number

Cost

Capture.JPG

Then i have a second database showing a cost saving target per month :

Capture.JPG

What i am trying to do is to sum up in a chart a cost including the target savings per part number.

The output should look like :

Capture.JPG

Although what i got is :

Capture.JPG

Thanks for your help

Guillaume

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

sorry, slight change below

LOAD Date,

    [Part Number],

    Cost,

    MonthEnd(Date) as SavingsDate

FROM

(ooxml, embedded labels, table is Sales);

/// SAVINGS ///

LOAD MonthEnd(Date) as SavingsDate,

    Savings

FROM

(ooxml, embedded labels, table is Savings);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
vinieme12
Champion III
Champion III

try joining the data with a new field

LOAD Date,

     [Part Number],

     Cost,

    MonthEnd(Date) as SavingsDate

FROM

(ooxml, embedded labels, table is Sales);

/// SAVINGS ///

LOAD Date as SavingsDate,

     Savings

FROM

(ooxml, embedded labels, table is Savings);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
guillaume_gorli
Creator II
Creator II
Author

Hi Vineeth,

It does not seem to work this way :

Capture.JPG

vhespinog
Contributor III
Contributor III

Hi.

Sales:

LOAD Year(Date) & Month(Date) as %Date,

     Date,

     [Part Number],

     Cost

FROM

[..\Downloads\TEST QLIK.xlsx]

(ooxml, embedded labels, table is Sales);

Savings:

LOAD

     Year(Date) & Month(Date) as %Date,

     Date as SavingsDate,

     Savings

FROM

[..\Downloads\TEST QLIK.xlsx]

(ooxml, embedded labels, table is Savings);

1.JPG

vinieme12
Champion III
Champion III

sorry, slight change below

LOAD Date,

    [Part Number],

    Cost,

    MonthEnd(Date) as SavingsDate

FROM

(ooxml, embedded labels, table is Sales);

/// SAVINGS ///

LOAD MonthEnd(Date) as SavingsDate,

    Savings

FROM

(ooxml, embedded labels, table is Savings);

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

or you can directly use MonthName()

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
anushree1
Specialist II
Specialist II

Hi,

Please check if this at serves the requirement

prieper
Master II
Master II

Think that you should use INTERVALMATCH. Would suggest to enter a date with 0% Savings for 1/1/2017 (begin of the Sales-activities), but anyhow:

/// COST ///

Sales:

LOAD Date,

     [Part Number],

     Cost

FROM

(ooxml, embedded labels, table is Sales);

/// SAVINGS ///

Savings:

LOAD Date,

     Savings

FROM

(ooxml, embedded labels, table is Savings);

Savings_FmTo:

    LOAD

        Date            AS Date_Fm,

        PREVIOUS(Date)    AS Date_To,

        Savings

    RESIDENT

        Savings

    ORDER BY

        Date DESC;

DROP TABLE Savings;

INTERVALMATCH (Date) LOAD Date_Fm, Date_To RESIDENT Savings_FmTo;

HTH Pete

guillaume_gorli
Creator II
Creator II
Author

Thanks a lot