Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

How to find New Record by writing a set analysis/front end script

Hi guys,

I have created a sample.qvw file as per attached.

in this example my records data for year 2015 and 2016 is loaded into 1 table.

There are few scenario i wanted to achieve. But i am not getting it from this expression:

Count(DISTINCT {<record_id = e({<record_id = {"=Count({<year = {'<$(=Max(year))'}>} record_id) > 0"}>})>} record_id)


By using the above expression for the New Risk - it gives me 3 new risks from 2015-2016. But that's not what i need now. 

If the user select year 2016, 2nd Half, version 4 - it should display 1 Risk only, when it compares to year 2016 1st half version 3

If the user select year 2016, 1st half, version 3 - it should display 2 Risks only, when it compares to year 2015 2nd half version 2

Those expected result i have already written in qvw file.

- Expected result for NEW RISK.

If i click on year 2016 2nd Half version:4

New Risk found = 1, record id = 98071 compare to 2016 1st half version 3


- Expected result for DELETED RISK.

If i click on year 2016 2nd Half version:4

Deleted Risk = 2 , record id: 56748 & 98596

Please help guys

Rgds

Jim

2 Replies
jim_chan
Specialist
Specialist
Author

my bad.. here;s the attachment qvw file.

sunny_talwar

For anyone wondering where the attachment is, please check here

Re: Count expression incorrect

Will check when I get time