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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulation ?

HI All,

I am having Amount field on the Basis of Credit & Debit from 2012 on wards...

I am Selecting Any month :

Ex:  Jun-2013, then Debit - credit till Jun-2013

       Mar-2013, then Debit - credit till Mar-2013

       Apr-2013, then Debit - credit till Apr-2013

After this I want get Last 12 MOnths Avg AMount...

If I Select Jun-2013, Then Output should be :

(Jun-2013, then Debit - credit till Jun-2013  +

May-2013, then Debit - credit till May-2013 +

May-2013, then Debit - credit till May-2013 +

......

.....

.....

July-2012, then Debit - credit till June -2012 )

Like cumulation process, Can any one help me on this....

Regards,

Helen

Labels (1)
3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this if you have a date field

1. For selected month

Dimension:

=Sum(Debit) - Sum(Credit)

2. For last 12 months

=Sum({<YearDimensionName=, MonthDimensionName=, DateDimensionName={'>=$(=MonthStart(Max(DimensionName), -11))<=$(=MonthEnd(Max(DimensionName)))'}>}) -

Sum({<YearDimensionName=, MonthDimensionName=, DateDimensionName={'>=$(=MonthStart(Max(DimensionName), -11))<=$(=MonthEnd(Max(DimensionName)))'}>}Credit)


Note: Replace YearDimensionName, MonthDimensionName and DateDimensionName with your actual field names.

Hope this helps you.

Regards,

Jagan.

its_anandrjs
Champion III
Champion III

For last 12 months you can try this way also

=Sum({<DateField={'>=$(=Addmonths(Max(DateField), -11)) <=$(=(Max(DateField)))'}>}) -

  Sum({<DateField={'>=$(=Addmonths(Max(DateField), -11)) <=$(=(Max(DateField)))'}>}Credit)


And rest of the filter to be used according to use.


Regards

Anand

Not applicable
Author

HI Anand Can you implement for this qvw...

cumulative issue?