Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DTD and MTD

Dear Gurus,

Could you please help me is resolving the below requirements.

Table:
LOAD * INLINE [
    Date, Exp 
    01/03/2015, 15
    02/03/2015, -5
    03/03/2015, 25  

    01/04/2015, 10

    02/04/2015, -5

    03/04/2015, 20

];

Requirements:

1. If 1/03/2015 select then result should be
Date            DTD      MTD
01/03/2015   15           15

2. If  01/03/2015 and 02/03/2015 Select  then result should be
Date               DTD      MTD
01/03/2015      15         15
02/03/2015      -5          10            (=15-5)

3. If 02/03/2015 and 03/03/2015 Select then result should be
Date            DTD   MTD
02/03/2015   -5      10                 (=15-5)
03/03/2015   25      35                 (=15-5+25)

4. If 02/04/2015 and 03/04/2015 Select then result should be
Date            DTD   MTD
02/04/2015   -5      5                 (=10-5)
03/04/2015   20      25                (=10-5+20)

Thanks in advacne and please do let me know in case of any clarification


1 Solution

Accepted Solutions
timanshu
Creator III
Creator III

Hi,

PFA QVW App and Screenshot.

View solution in original post

5 Replies
Not applicable
Author

Please find the attached Document

PrashantSangle

Hi,

If Date is your dimension, For DTD just write sum(Sales)

and for MTD

Create Day field in Script and nullify it in expression

try like

sum({<Date={">=$(=date(min(Date)))<=$(=date(max(Date)))"},Day=>}Sales)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Please find the attached Document

timanshu
Creator III
Creator III

Hi,

PFA QVW App and Screenshot.

senpradip007
Specialist III
Specialist III

PFA. Hope it will help.