Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I am trying to write two conditions in an IF statement

I am trying to see if a Prime Name or relationship to a Master Name changes.

Below is the data:

   

DatePrime CodePrime NamePrime CityPrime StateMaster CodeMaster NameBroker Name
Dec-16abcdAon ChicagoChicago Illinoisefghefghefgh
Dec-15abcdAon ChicagoChicago Illinoisefghefghefgh
Dec-14abcdAon ChicagoChicago Illinoisijklijklijkl

Here is what I want to see:  For Dec 2016, the names stayed the same so the result is True, For Dec 2015 the names stayed the same so the results are still True, but in Dec 2014, the Master Name, Code and Broker Name changed so the result is changed to False.

I tried something like this but it didn't work:  =IF(([Business Cycle Dt] = Max([Business Cycle Dt]) and [Business Cycle Dt] = '2016-12-31') and ([Prime_Producer_Name]=[Prime_Producer_Name])),'True', 'False'

   

as of Dec 2016as of Dec 2015as of Dec 2014
Prime CodePrime NamePrime CityPrime StateMaster CodeMaster NameBroker NameCYTD (2017)WPMaster AsscociationWPMaster AsscociationWPMaster AsscociationWP
abcdAon ChicagoChicago IllinoisefghAon MidwestAon1000TRUE1200TRUE900FALSE1300

   

4 Replies
Anonymous
Not applicable
Author

You need to compare in a table or script??

hector_munoz
Specialist
Specialist

Hi,

You could do it in script if all the fields reside in the same table, first ordering by 'Prime Code' ASC, Date DESC, for example and later using Previous() function in order to detect if the same values are in the fields of the record of the following year.

I hope it helps you!

Regards,

H

Anonymous
Not applicable
Author

In a table

Anonymous
Not applicable
Author

like this.  where it is true that is where the names didn't change.

   

   

as of Dec 2016as of Dec 2015as of Dec 2014
Master AsscociationWPMaster AsscociationWPMaster AsscociationWP
TRUE1200TRUE900FALSE1300