Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Optimise Code

Dear All,

 

if(RecNo = 1 or PEEK(MATERIAL) = MATERIAL,0,
IF(FREQUENCY_DAYS_MAC = 1,SUM_PROD_QTY_DAILY_MAC,

IF(FREQUENCY_DAYS_MAC = ,SUM_PROD_QTY_DAILY_MAC + PEEK(SUM_PROD_QTY_DAILY_MAC),


IF(FREQUENCY_DAYS_MAC = 3,SUM_PROD_QTY_DAILY_MAC + PEEK(SUM_PROD_QTY_DAILY_MAC)+Peek(PEEK(SUM_PROD_QTY_DAILY_MAC)),


IF(FREQUENCY_DAYS_MAC = 4,SUM_PROD_QTY_DAILY_MAC + PEEK(SUM_PROD_QTY_DAILY_MAC) + Peek(PEEK(SUM_PROD_QTY_DAILY_MAC)) + PEEK(Peek(PEEK(SUM_PROD_QTY_DAILY_MAC))),

IF(FREQUENCY_DAYS_MAC = 5,SUM_PROD_QTY_DAILY_MAC + PEEK(SUM_PROD_QTY_DAILY_MAC) + Peek(PEEK(SUM_PROD_QTY_DAILY_MAC)) + PEEK(Peek(PEEK(SUM_PROD_QTY_DAILY_MAC))) + PEEK(PEEK(Peek(PEEK(SUM_PROD_QTY_DAILY_MAC))))

 

 

Like we need to implement 90 days..Please suggest easiest way to achieve this.

Labels (2)
3 Replies
Highlighted

I would go with Flags for number of arbitrary ranges on each section.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Please give some example..it will help to me.

Highlighted

Please explain the business logic?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)