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: 
rnguyen2
Contributor
Contributor

Qlik Sense Set Analysis Expression Previous Period Sum

Hello,

I need some help with my set analysis expression.

I am trying to populate the beginning AR Balance for the month with the ending AR Balance for the prior month.

Below is my set expression.

Sum({$<[posting_date.autoCalendar.Date]={"$=addmonths([posting_date.autoCalendar.Date],-1)"}, BALANCE_TYPE={"DEBIT_BALANCE"}>} [AR BALANCE])

2019-02-26_13-03-13.png

16 Replies
sunny_talwar
MVP
MVP

What is your expression for Ending Gross AR Balance? I am assuming that Year-Month is a dimension and here and Description is a synthetic dimension or is it a dimension also?

rnguyen2
Contributor
Contributor
Author

The expression for Ending Gross AR Balance is 

sum({<BALANCE_TYPE={"DEBIT_BALANCE"}>} [AR BALANCE])

 

The Description Dimension  = [posting_date.autoCalendar.YearMonth]

sunny_talwar
MVP
MVP

Try this

Before(Sum({<BALANCE_TYPE = {"DEBIT_BALANCE"}>} [AR BALANCE]))
rnguyen2
Contributor
Contributor
Author

That does not work for me.  

sunny_talwar
MVP
MVP

Would you be able to share a mocked up version of your app where we can see the issue?

rnguyen2
Contributor
Contributor
Author

I do not and I want to make sure if a prior month is deselected as a filter it does not affect the calculation.

sunny_talwar
MVP
MVP


@rnguyen2 wrote:

I do not and I want to make sure if a prior month is deselected as a filter it does not affect the calculation.


You do not what?

rnguyen2
Contributor
Contributor
Author

I don't have a mocked version I can share.

sunny_talwar
MVP
MVP

Can you share your app? I mean it would be difficult to know what might be going on without seeing what you have