Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gilldilpreet
Contributor III
Contributor III

Write an expression with multiple conditions

Hi, 

I am trying to write the expression below but it is returning an error.

I would like the calculated dimension to show the Acceptance date WHERE the Paper Type Code =1 and for the highest Paper Number (which is a field that shows paper numbers in sequence i.e. identifies the most recent).

gilldilpreet_0-1599573540391.png

Thanks in advance for any help on this! 

Dilpreet 

Labels (1)
4 Replies
Kushal_Chawda

@gilldilpreet Can you share sample data with expected output?

gilldilpreet
Contributor III
Contributor III
Author

Using the data below as an example;

Student IDPaper Type CodePaper NumberAcceptance Date
11A0102/03/2004
11A0203/03/2004
12A0304/03/2004
21A0505/03/2004
22A0606/03/2004

 

This is the result I am after;

Student IDAcceptance Date
102/03/2004
205/03/2004
Brett_Bleess
Former Employee
Former Employee

@Kushal_Chawda  Poster responded back with sample data and expected output, guessing the notifications may still be having some issues in Community, sorry about that if so.  Thanks in advance for checking back.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Kushal_Chawda

@gilldilpreet  try below expression

=aggr(if([Paper Number]= maxstring(total <[Student ID]>{<[Paper Type Code]={1}>}[Paper Number]),[Acceptance Date]),[Student ID],[Paper Type Code],[Paper Number])