Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sagaraperera
Creator
Creator

03 month

Dear All,

Kindly note that I am currently using the below appended “Selection Tool” to arrive at the sales value for the past 3 months.

YEAR= 2017/2018

MONTH= JAN/DEC/NOV

(PLEASE REFER ATTACHMENT)   

The issue I am encountering is when I apply the said selection tool, the value includes the Jan 2017 figure as well

Hence please advise me as to how I could avoid in arriving at the unwanted figure (Jan 2017)

MY SCRIPT

LOAD BCOD,

     CLA_CODE,

     PRD_CODE,

     POLICY_NO,

     REF_NO,

     DATE(floor(MARKETING_DATE)) as  MARKETING_DATE,

      MDATE,

     YEAR,

     MONTH,

     NAME,

     ME_CODE,

     DATE(floor(TRN_DATE)) as  TRN_DATE,

     POL_PERIOD_FROM,

     SCCOD,

     CP,

     RS,

     TC,

     GROSSTOT as sales ,

     TYPE,

     N_R_NOS1,

     F_NOS2

password

Sagara123

2 Replies
lorenzoconforti
Specialist II
Specialist II

Hi Sagara

Not sure I understand fully the issue; you are selecting month jan, nov and dec, and 2017 and 2018. QlikView will include the Jan 2017 figures as they are included in your selection.

If you just want the last three months you would need to make a different selection. Couldn't you just add another list box with MONTH_YEAR and filter through that?

jharke
Creator II
Creator II

Hello Sagara

You can use this line in each table of the script

    MONTH,

    YEAR & '-' & MONTH AS YearMonth,

    YEAR,

Or (as suggested by Lorenzo) you can add a Listbox.

As Field, scroll down to -Expression-  and use: = YEAR & '-' & MONTH.

Sorting on A-Z

See attachment