Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Filter data

Hello Experts below is my set expression which gives me the number of contacts each year but I would like to know the new contacts each year. That is, for each year I would like to filter out all contacts which are appearing for the first time. I would like to know the new contacts for every year

=if(IsNull(GetFieldSelections([Contacted By])),
Count({$<[Assigned Flag]={'Y'},CRTeamFlagContact={'Y'}>}Distinct [Contact Name]),
Count({$<[Assigned Flag]={'Y'},[Assigned RDM]={'$(=[Contacted By])'}>}Distinct [Contact Name]))

1 Reply
Vegar
MVP
MVP

I focused on your if=true() expression in my answer. image.png

Assuming you got the field Year in your data model then you can use this.

 

=Count({$<
   [Contact Name]=E({<Year={'$(=Max(Year)-1)'}>} [Contact Name]),
   Year={'$(=Max(Year))'},
   [Assigned Flag]={'Y'},CRTeamFlagContact={'Y'}
    >}Distinct [Contact Name])

 

See even attached QVF file