Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD accumulation

Hi All,

I am calculating YTD accumulation for current year ,previous year  and showing forecast and target value for current financial year

CY calculation

=rangesum(above(SUM({<Particulars = {'Sales'},DataFlag= {1},[Strategic Code]={'C4'},ID_Mon = {$(=vIDMon)},[Time Span]={'Actual'},FiscalYear={"$(=max(FiscalYear))"},Description = {'Units sold KAM (Units)','Units sold KAM'},CalMonth=>}Data),0,vIDCount)).

But issue is while using rangesum function it is showing preceding month data in coming next month.Accumulation.png

It should  not show data in June month

Kindly let me know how it can resolve.

Thanks in advance

Regards

Sumita Chawla

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Please find the attachment, hope this solves your problem.

View solution in original post

9 Replies
Kushal_Chawda

what is vIDCount  ?

effinty2112
Master
Master

Hello,

               I think the easiest way to achieve what you want is to add a YTD field in your load script.

Something like:

if(DayNumberOfYear(Date)<=DayNumberOfYear($(vToday)),1,0) as YTD

Now you can add a list box for YTD and if you select "1" any charts will give the YTD accumulations, or instead you can add this set modifier to expressions to make them show YTD values: {$<YTD = {1}>}

Cheers

Andrew

Not applicable
Author

Hi

In vIDcount I am calculating count of months for eg. in this case value of vIDcount is 2(Apr,May)

Not applicable
Author

Hello,

In Load script how would I calculate accumulation.

Please elaborate or provide example.

sasikanth
Master
Master

hi,

Try this

Load *,

RangeSum(Sales,Peek('NewSales')) as NewSales

.

.

From Table;

Kushal_Chawda

I think you need to restrict your forecast expression to previous 2 months, as Forecast expression is calculated for all the months, CY accum also performed for Jun month

Not applicable
Author

No I cant restrict forecast because I need to show forecast for current and next two months.

Anonymous
Not applicable
Author

Hi,

Please find the attachment, hope this solves your problem.

Not applicable
Author

Thanks Payal its working