Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist
Specialist

Set Analysis Syntax - For subgroup A, how many also have B?

I have a text box that says how many tickets were Opened within the last 3 months and it works:

=Count({$<DEFECT_ID *= {"=Min({1}DETECT_DATE) >= AddMonths(Today(),-3)"}>}DISTINCT DEFECT_ID)

I am trying to come up with the right syntax to show of the tickets opened within the last 3 months, what was the avg days between two steps but I can't get it combined correctly:

=num(avg(aggr(date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'2.1*'} >} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY')-
date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'1.1*'} >} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY'),DEFECT_ID)),'#0')

TIA! 

1 Solution

Accepted Solutions
Nicole-Smith

You should just be able to add the set analysis from the first into the second:

=num(avg(aggr(date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'2.1*'}, DEFECT_ID *= {"=Min({1}DETECT_DATE) >= AddMonths(Today(),-3)"}>} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY')-
date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'1.1*'}, DEFECT_ID *= {"=Min({1}DETECT_DATE) >= AddMonths(Today(),-3)"}>} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY'),DEFECT_ID)),'#0')

View solution in original post

1 Reply
Nicole-Smith

You should just be able to add the set analysis from the first into the second:

=num(avg(aggr(date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'2.1*'}, DEFECT_ID *= {"=Min({1}DETECT_DATE) >= AddMonths(Today(),-3)"}>} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY')-
date(min( {$<ADJ_GOVERNANCE_PHASE_SUMMARY={'1.1*'}, DEFECT_ID *= {"=Min({1}DETECT_DATE) >= AddMonths(Today(),-3)"}>} ADJ_GOVERNANCE_PHASE_START_DATE),'MM/DD/YYYY'),DEFECT_ID)),'#0')

View solution in original post