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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sagaraperera
Creator
Creator

above function

Dear all

I want to get a figure below 100000 7 above 100000 i try it but not work my normal expression given below. please help me

Sum (GROSSTOT)

sagara

3 Replies
swuehl
MVP
MVP

Sorry, I didn't get what you are trying to achieve.

Could you post a screenshot or some sample lines of table records?

In which context do you want to do the calculations? Script? Chart?

sagaraperera
Creator
Creator
Author

THANKS FOR YOUR REPLY

I TRY TO GET FIGURE SEPARATELY FIRST ONE BELOW 100000 & SECOND ONE ABOVE 100000

MY SCRIPT

LOAD BCOD,

     CLA_CODE,

     PRD_CODE,

     POLICY_NO,

     REF_NO,

     MDATE,

     YEAR,

     MONTH,

     NAME,

     ME_CODE,

     //TRN_DATE,

     DATE(floor(TRN_DATE)) as  TRN_DATE,

     TRAN_YEAR,

     TRAN_MONTH,

     POL_PERIOD_FROM,

     SCCOD,

     CP,

     RS,

     TC,

     GROSSTOT,

       N_R_NOS1,

     F_NOS2   

swuehl
MVP
MVP

Maybe like

Result:

LOAD ....

          GROSSTOT,

          If( GROSSTOT>=10000 and previous(GROSSTOT)< 10000, previous(GROSSTOT) ) as FirstUnder10000,

          If(GROSSTOT>=10000 and previous(GROSSTOT)< 10000, GROSSTOT) as FirstAbove10000,

          If(Peek(FirstAbove10000) >0, GROSSTOT) as SecondAbove10000

          ....

RESIDENT YourTable

ORDER BY GROSSTOT asc;

DROP TABLE YourTable;