Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
arsenal1983
Creator
Creator

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

0 Replies