# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor III

## Quarter over Quarter Analysis

Hi All,

I have a requirement where i need to derive column based on a specific column. for better understanding consider below example.

1230/09/20173
1330/06/20172
1331/03/21071

I need to derive status column so, in the above example Trade No = 1, for quarter 3 it need to compare the level of Quarter 2 and give it as 'TO'.

for the same trade no =1 , for quarter 2 when compared to quarter 1 as the level is same it should show same as status.

The above calculation I need in back end script.

Summary: for every trade number it should compare current qtr with previous Qtr and derive the status.

The o/p should look like:

1230/09/20173
13TI30/06/20172
13Same31/03/21071

The level should always need to be compared with previous quarter value.

Thanks,

Vivek

Message was edited by: vivek Moningi

Tags (2)
1 Solution

Accepted Solutions
Highlighted
New Contributor III

## Re: Quarter over Quarter Analysis

Hi Anil,

My requirement is basically I need to compute Status based on Level Column. The criteria to compute Status is done by checking level movement ( so, when i mean level movement I check the level value for Q3 against the level value for Q2, for Q2 it will be checked against Q1 and so on) based on this i will create a flag which is Status.

Status will be like this If in Q3 , Level = 3 and Q2, level =3 then status should be Same,

Q3 , lvl= 3, Q2 =1, then status should Transfer IN

Hope this give you more insights.

Thanks,

Vivek

4 Replies
Highlighted

## Re: Quarter over Quarter Analysis

Can you make it clear the result set as well using differentiate another column? Probably that may help us to take

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)
New Contributor III

## Re: Quarter over Quarter Analysis

Hi Anil,

I have made the changes hope this fine.

Thanks,

Vivek

Highlighted

## Re: Quarter over Quarter Analysis

Output was okay, But for me it's not understandable. Will you explain little more to check? I am sorry for that question again

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
New Contributor III

## Re: Quarter over Quarter Analysis

Hi Anil,

My requirement is basically I need to compute Status based on Level Column. The criteria to compute Status is done by checking level movement ( so, when i mean level movement I check the level value for Q3 against the level value for Q2, for Q2 it will be checked against Q1 and so on) based on this i will create a flag which is Status.

Status will be like this If in Q3 , Level = 3 and Q2, level =3 then status should be Same,

Q3 , lvl= 3, Q2 =1, then status should Transfer IN

Hope this give you more insights.

Thanks,

Vivek