Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
agrawalpavan
Partner - Contributor II
Partner - Contributor II

Need help with set analysis in a table

Hi all,

thanks in advance for your help.

There is a table with Date, month and year and an amount field called "RevAmount" and a master calendar associated with it.  There is one dimension field called "Salesperson".

Created a "Table" chart with these fields.

I need to refer to sum(RevAmount) of previous month on this table.

For example if I have filter pane selected to year 2018 and the table is showing SUM(RevAmount) by Month, I have 12 rows one for each month (for year 2018). Now On each row I need to refer to SUM(RevAmount) for previous month.  For 2018 January I need to get the value for 2017 December which is not part of the selection (Year=2018).

I tried using _MonthSerial and that is not working.

This formula is not working way I want.

SUM({1<Year=,Month=,[_MonthSerial]=,[_MonthSerial] = {"=$(=Max([_MonthSerial])-1)"}  >}  RevAmount)

1 Solution

Accepted Solutions
sunny_talwar

Try this instead

Aggr(Above(Sum({<Year, Month, [_MonthSerial], [_MonthSerial]>} RevAmount)), MonthYear)

View solution in original post

2 Replies
sunny_talwar

Try this instead

Aggr(Above(Sum({<Year, Month, [_MonthSerial], [_MonthSerial]>} RevAmount)), MonthYear)

agrawalpavan
Partner - Contributor II
Partner - Contributor II
Author

Sunny,

This is awesome. It works.

Really appreciate it.

Thank you,

Pavan