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

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
Labels (1)
1 Reply
marcus_sommer
MVP
MVP

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