Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Period over Period Account Balance Difference %

What is the best way to calculate difference is account balance.

Overview of what I have done so far:

  1. I have added two sheet with two different approach:
    • 1st approach is creating pivot table and calculating differences in account balance considering before function
    • 2nd approach is creating straight table and calculating  differences in account balance using above function
  2. Pending issues:
    • Period Slider is not dynamic
    • Difference sort order
Calculation
Account Balance: Sum(Amount)
Difference: if(Period='2014/1',0, sum( Amount)- before(sum(Amount)))
Difference %: fabs(if(Period='2014/1',0,sum( Amount)- before(sum(Amount)))/sum( Amount))
Capture.PNG
Capture2.PNGCapture3.PNG
1 Reply
marcus_sommer

I think you need to wrap your before-expression within an aggr-function - see here Calculating rolling n-period totals, averages or other aggregations to the example of the rolling 3-months which is quite similar to your task.

- Marcus