3 Replies Latest reply on Oct 3, 2016 11:09 AM by Michael Hesser

Help With Expresssion

 User ID Record No MONTH YEAR Plan GRP 11111 1000001 January 2015 1 11111 1000002 February 2015 3 11111 1000003 March 2015 2 11111 1000004 April 2015 2 11111 1000005 May 2015 3 11111 1000006 June 2015 5 11111 1000007 July 2015 4 11111 1000008 August 2015 5 11111 1000009 September 2015 4 11111 1000010 October 2015 5 11111 1000011 November 2015 4 11111 1000012 December 2015 4 11111 1000013 January 2016 5 11111 1000014 February 2016 4 11111 1000015 March 2016 5 11111 1000016 April 2016 4 11111 1000017 May 2016 5 11111 1000018 June 2016 4 11111 1000019 July 2016 5 11111 1000020 August 2016 1

I have data coming in first 5 columns . My requirement is to find Max of Plan Group  and compare it with previous plan Groups and give me indicators  as 0, if my most recent plan & data in Plan grp is matching and 1 if data is not matching .   I'm using

IF [MonthYear] = {fixed[User Id]:max([endDate])}    to get max plan Group for User  . and  if [Plan GRP] = [Most Recent GRP] then 0 else 1 end ( to get Indicator )

i am getting one max value for each User but  not against getting right data .

the data should be like :

 User ID Record No MONTH YEAR Plan GRP Most Recent Grp indicators( New calculated Column ) 11111 1000001 January 2015 1 1 0 11111 1000002 February 2015 3 1 1 11111 1000003 March 2015 2 1 1 11111 1000004 April 2015 2 1 1 11111 1000005 May 2015 3 1 1 11111 1000006 June 2015 5 1 1 11111 1000007 July 2015 4 1 1 11111 1000008 August 2015 5 1 1 11111 1000009 September 2015 4 1 1 11111 1000010 October 2015 5 1 1 11111 1000011 November 2015 4 1 1 11111 1000012 December 2015 4 1 1 11111 1000013 January 2016 5 1 1 11111 1000014 February 2016 4 1 1 11111 1000015 March 2016 5 1 1 11111 1000016 April 2016 4 1 1 11111 1000017 May 2016 5 1 1 11111 1000018 June 2016 4 1 1 11111 1000019 July 2016 5 1 1 11111 1000020 August 2016 1 1 0

Pls Help !!

• 1. Re: Help With Expresssion

Hello Archana;

What happens when you change your logic to:

if [Plan GRP] <> [Most Recent GRP] then 1 else 0 end  ?

It might also be helpful to add a column for your fixed date calculation. You may find one is evaluating at the DAY level (rather than month), which would nullify all but one of your results.

Let us know what you find!

1 of 1 people found this helpful
• 2. Re: Help With Expresssion

Thanks Michael!!

• 3. Re: Help With Expresssion

Did it work? Any change?