Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
arsenal83
Contributor

calculating in script

Hello,

I have such DATA in my SOURCE:

PARTNER NAME,

PERIOD (QTR),

REVENUES

REVENUES are cumulated in the year (Q1 is revenue for Q1, Q2 is revenue for Q1 and Q2 ad so on)

I need to calcuate REVENUES_QARTARLY for every single quarter - on script level.

So generaly:

if (Q1, REVENUES, REVENUES - PREVIOUS REVENUES)

The trap I identified:

1. When Partner appears first time in data:

  a) if he appeard in Q1 it is easy no calculations are necessery

  b) if he appeard in Q2 I need the average (REVENUES/QTR_NO)

2. When there is a drop in data

  a) for period with the lack I don't want to see any REVENUES_QARTARLY

  b) for period after the lack I need the average (REVENUES/QTR_NO)

Anny suggestions?,

L

Community Browser