Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

nenadvukovic
Contributor III

How to allocate a yearly number into financial periods set up as 4-4-5 weeks?

Dear Community,

Is there a simple formula to get numbers for 12 periods based on the setup from the title?

For example, a number of 13,000 should result in these 1,000, 1,000, 1,250, 1,000, etc.

Thank you

1 Solution

Accepted Solutions
nenadvukovic
Contributor III

Re: How to allocate a yearly number into financial periods set up as 4-4-5 weeks?

I found this to be working. First divide the amount by 52 to get amounts per week, and then, as my periods are structured as this, P01-17, use this line in the script:

if(fmod(mid(FPeriod, 3, 1), 3), WeekVolume * 4, WeekVolume * 5) as PeriodVolume;

1 Reply
nenadvukovic
Contributor III

Re: How to allocate a yearly number into financial periods set up as 4-4-5 weeks?

I found this to be working. First divide the amount by 52 to get amounts per week, and then, as my periods are structured as this, P01-17, use this line in the script:

if(fmod(mid(FPeriod, 3, 1), 3), WeekVolume * 4, WeekVolume * 5) as PeriodVolume;