Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sagaraperera
Creator
Creator

Below & above

Dear All,

i want to below 100000 and above 100000 sales figure separately, and it is name should be AGE. my script given below.in this script GROSSTOT is a value colum.

SALES:

LOAD BCOD,

     CLA_CODE,

     PRD_CODE,

     POLICY_NO,

     REF_NO,

     DATE(floor(MARKETING_DATE)) as  MARKETING_DATE,

     //DATE(monthstart(MARKETING_DATE), 'MM-YYYY') as MonthYear,

     MDATE,

     YEAR,

     MONTH,    

     NAME,

     ME_CODE,

     //TRN_DATE,

     DATE(floor(TRN_DATE)) as  TRN_DATE, 

     TRAN_YEAR,

     TRAN_MONTH,

     POL_PERIOD_FROM,

     SCCOD,

     IF(SCCOD>='SC0','COUNTER')AS CITY_COUNTER,

     CP,

     RS,

     TC,

     GROSSTOT,

      TYPE,

     N_R_NOS1,

     F_NOS2

FROM

G:\qlickviwe\Sales\SALES2012.QVD

(qvd);

5 Replies
SreeniJD
Specialist
Specialist

Hi Sanka

Can you please provide some more clarity on your question

Thanks,Sreeni

sagaraperera
Creator
Creator
Author

I want to sales figure in a separately it should be  is below 10000 & above 100000 base on Grostot.

thanks

krishna20
Specialist II
Specialist II

Hi ,

Your Script may be like this,

SALES:

LOAD *,

if(Sum(GROSSTOT)<100000 ,GROSSTOT) as AGE;


LOAD *,

if(Sum(GROSSTOT)>100000, GROSSTOT) as GROSS_AGE;

LOAD BCOD,

     CLA_CODE,

     PRD_CODE,

     POLICY_NO,

     REF_NO,

     DATE(floor(MARKETING_DATE)) as  MARKETING_DATE,

     //DATE(monthstart(MARKETING_DATE), 'MM-YYYY') as MonthYear,

     MDATE,

     YEAR,

     MONTH,   

     NAME,

     ME_CODE,

     //TRN_DATE,

     DATE(floor(TRN_DATE)) as  TRN_DATE,

     TRAN_YEAR,

     TRAN_MONTH,

     POL_PERIOD_FROM,

     SCCOD,

     IF(SCCOD>='SC0','COUNTER')AS CITY_COUNTER,

     CP,

     RS,

     TC,

     GROSSTOT,

      TYPE,

     N_R_NOS1,

     F_NOS2

FROM

G:\qlickviwe\Sales\SALES2012.QVD

(qvd);

gautik92
Specialist III
Specialist III

if(Sum(GROSSTOT)<100000 ,GROSSTOT)  as age,

if(Sum(GROSSTOT)>100000 ,GROSSTOT)  as age,

MarcoWedel

Hi,

please don't post the same questions multiple times and try to close your threads if you received correct answers.

Below 100,000 &amp; Above 100,000

below above

Below &amp; above

thanks

regards

Marco