Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikBeginner1
Creator
Creator

Set analysis

Hello.

I am creating a simple report in Qlik. I have created the QVD and pulling through the fields into the app.

I am trying to understand how to manipulate the report to show results based off some rules?

An example of some rules I am trying to implement are: 

Compare Bound date and inception date:
If Transaction date < Inception date then include in the report
If Transaction Type = “New Business” then include in the report extract if:
Policy effective date > reporting date 

If the Transaction Type = “Renewal” then include in the report extract if:
Policy Effective date > reporting date 

 

I have the Transaction Type dimension in the table, as well as effective date and the reporting date (reload date of the report). however I am trying to undestand how to implement those rules into the set anaylsis? Can someone please help to allow me to understand how to do this? I do have some measures, such as Sum (gwp) field. any help please would be greatly appreciated, 

Labels (3)
2 Replies
Nicole-Smith

I would suggest creating flag fields in your load script based on the comparisons, and then use those fields in the set analysis.

For example, on your first comparison, you could create a field in the script as follows:
if([Transaction date] < [Inception date], 1, 0) AS [Flag Name]

Then in your set analysis, you could simply do:
sum({<[Flag Name]={1}>} gwp)

QlikBeginner1
Creator
Creator
Author

That is brilliant thanks, I have got that working, how do I then add all the flags into one measure to only bring through where the flag = '1'?

Sum({$< BBNIFLAG04 = {'1'}, BBNIFLAG05 = {'1'} >}GrossWrittenPremium) 

I have tried this for example but I believe its looking for records which have both flags as '1' instead of bringing in any records which have any of the flag fields as '1', not all?