Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rasunitha
Contributor
Contributor

Get a list of Agents without Policy in last 12 months (Set Analysis)

Dear Experts,

 

I am new to Qlik Sense and I have been stuck with this issue. 

Please find the mock data below:

AgentsPoliciesIssue Date
Buil1P114-Aug-20
Buil1P221-Dec-15
Buil2P35-Feb-14
Buil2P43-Apr-19
Buil3P59-Sep-17
Buil3P614-Aug-20
Buil3P73-Apr-19
Buil4P816-Oct-19
Buil4P95-Oct-19
Buil4P1024-Dec-18
Buil5P1122-Oct-18
Buil5P1231-Dec-17
Buil6P1324-Dec-18
Buil7P1422-Oct-18
Buil7P159-Sep-17

 

I need to show a table with a list of Agents who didn't have any policies in the last 12 months (from the current date). My table should look like this.

Agents without Policies in last 12 Months
Buil2
Buil5
Buil6
Buil7

 

I used a Set Analysis as follows 

IF(SUM(AGGR( if( Date(Date#(POL_ISSUE_DATE, 'YYYYMMDD')) - Date#(Date(AddMonths(today(), -12)), 'DD/MM/YYYY') > 0 , 1,0)
,POLICIES))= 0,1,0)

But this does not seem to be working.

Any help would be greatly appreciated.

@sunny_talwar @tresesco 

Thank you.

Best Regards,

Sunitha

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try :

Aggr(Only({<Agents=e({<[Issue Date]={">=$(=Addmonths(Today(),-12))"}>})>}Agents), Agents)

View solution in original post

1 Reply
tresesco
MVP
MVP

Try :

Aggr(Only({<Agents=e({<[Issue Date]={">=$(=Addmonths(Today(),-12))"}>})>}Agents), Agents)