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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
skzwane01
Contributor III
Contributor III

Show previous month data on current month selection

Hi,

I have a dataset of employees per month. I have to create an opening balance expression which is: the closing balance of the previous month. Please see examples below:

Sept 2020 Closing Balance = 200

Oct 2020 Opening balance = 200 and Closing Balance is 250.

Nov 2020 Opening Balance = 250 and Closing Balance is 230.

Dec 202 Opening Balance = 202 and Closing Balance is 200

Hope this makes.

Your assistance is highly appreciated.

Kind Regards

Labels (3)
2 Replies
jwjackso
Specialist III
Specialist III

You can calculate the [Opening Balance] as Above ([Closing Balance])

skzwane01
Contributor III
Contributor III
Author

Thanks it works!!! It is actually the "Before" function.

How do I now show the first months data? If you look at the below example, 202011 has no value based on the current selection, how do I show the 202010 closing balance as the 202011 Opening balance?

skzwane01_5-1617953266604.png

 

 

The expression is as below: 

skzwane01_4-1617953150754.png