Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

yipchunyu
New Contributor III

Generate quarter data from year-to-date figures

NameQuarterTypeAmountCase
Company A2018Q3A9579761.415633
Company B2018Q3A2678371.3330
Company C2018Q3A2040
Company A2018Q3B519343.324
Company B2018Q3B00
Company C2018Q3B10045344
Company A2018Q3C3298902.222370
Company B2018Q3C00
Company C2018Q3C574220.8873
Company A2018Q3Total13398006.938027
Company B2018Q3Total2678371.3330
Company C2018Q3Total1578958.8877

Every month I will receive data from external source which calculated the year to date total.  I would like to transform the data as above table for easier analysis e.g. quarter to quarter, year to date, year to year ... However, since the data are already calculated year to date amount.  Any way to use previous quarter's records to store the amount for the new quarter in loading scripts?  For example, for company A, 2018Q2, Type A may be 4000000.  And so I can store only the 4579761.4 for Q3.  Or it's better to store the year-to-date total instead of quarter amount?

I'm totally new in qlikview and your input is greatly appreciated. 

1 Solution

Accepted Solutions
yipchunyu
New Contributor III

Re: Generate quarter data from year-to-date figures

I finally did it in this way.

I multiple -1 for previous months' records and then use a mapping to map the quarter e.g. 2018Q1->2018Q2

And then sum it up.  

The YTQ total in Q2 will then subtract the YTQ in Q1.

View solution in original post

1 Reply
yipchunyu
New Contributor III

Re: Generate quarter data from year-to-date figures

I finally did it in this way.

I multiple -1 for previous months' records and then use a mapping to map the quarter e.g. 2018Q1->2018Q2

And then sum it up.  

The YTQ total in Q2 will then subtract the YTQ in Q1.

View solution in original post