
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using set analysis to get a value of previous period
Hi. I have a dataset with the fields: Account_id, account_score, year_quarter, YearQuarterKey (which is a running sequencial number for every year-quarter combination). I want to use set analysis in a table presentation on my app, and to add the field previous_quarter_score to every row ! in the table, according the field YearQuarterKey
I tried:
=max( {< YearQuarterKey = {"$(=(YearQuarterKey-1))"} >} account_score)
It did not work.
Any thoughts on how to accomplish this?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this: =Max({<YearQuarterKey = {"$(=(Max(YearQuarterKey)-1))"}>} account_score)
The inner =(Max(YearQuarterKey)) will give you the highest value for YearQuarterKey based on your selection, from that one will then be subtracted.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
Try like below
=Max({<YearQuarterKey = {"$(=(Max(YearQuarterKey)-1))"}, year_quarter=>} account_score)
Exclude the time filters selection in the set analysis if you are finding the previous period.
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
max( {< YearQuarterKey = {"$(=(max(YearQuarterKey)-1))"} >} account_score)
