cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Filter based on the last N records?

former_member279138
Participant
0 Kudos

Is it possible to filter based on the results to see only trends.

In others words if all I'm interested in is to see whether something has happened the last three times. I set up a filter to only show the last three events.

What I would have is

Client 1

Date 1 A

Date 2 A

Date 3 C

Client 2

Date 1 C

Date 2 C

Date 3 A

Client 3

Date 1 A

Date 2 A

Date 3 A

But all I would see is

Client 3

Date 1 A

Date 2 A

Date 3 A

Because all I care about is if A happened 3 times in a row (over the last three occurrences)

Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member279138
Participant
0 Kudos

I have @Type9Code

if {client_history.sales_code} in ["999", "999z", "989z", "9993"] then 1 else 0

then in the group selection formula I have

Sum ({@Type9Code}, {client_history.clientID}) < 2.00

Former Member
0 Kudos

Sorry I assumed you had already grouped data by Client.

Add that group you can then suppress headers and footers if not required

former_member279138
Participant
0 Kudos

I was able to submit it without error but it didn't seem to have an effect. The typeA formula is counting all the entries that are being hidden

Former Member
0 Kudos

Please show your formula and group submission formula

Ian

former_member279138
Participant
0 Kudos

I have @Type9Code

if {client_history.sales_code} in ["999", "999z", "989z", "9993"] then 1 else 0

then in the group selection formula I have

Sum ({@Type9Code}, {client_history.clientID}) < 2.00

Former Member
0 Kudos

Create a formula

@TypeA

If {Yourfield} = 'A' then 1 else 0

Click Filter and select Group.

in Formula editor Screen

sum({@TypeA}, {Client}) ❤️

Ian

former_member279138
Participant
0 Kudos

I get an error that says "There must be a group that matches this field"