Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Date Variables with Set Analysis

Can someone please help me get this in the right syntax?

=count({$<DETECT_DATE= {"<=$(vDefectStart) and >=$(vDefectEnd)"}*e( {1< PRIMARY_DECISION_BODY ={'SMG Committee'}) >}distinct DEFECT_ID)

30 Replies
cbaqir
Specialist II
Specialist II
Author

DEFECT_STATUS={'New'} should not be needed anymore since we are identifying a New ticket by the DETEC_DATE and DEFECT_STATUS_START_DATE={"<=$(=AddMonths(Today(),-6))"}>} is when it was rolling 6 months and should be DETECT_DATE is BEFORE the selected date range...

But, this is not returning anything:

=Count({$<DEFECT_ID=P({<CUR_STATUS = {'Closed'},CLOSE_DATE={">=$(vDefectStart)<=$(vDefectEnd)"},DETECT_DATE={"<$(vDefectStart)"}>})
*
E({< PRIMARY_DECISION_BODY ={'SMG Committee'}>})>}DISTINCT DEFECT_ID

antoniotiman
Master III
Master III

There are no records with these conditions.

cbaqir
Specialist II
Specialist II
Author

Then I explained it wrong. There should be 522. Here are the requirements:

  • CUR_STATUS = Closed
  • PRIMARY_DECISION_BODY NOT SMG Committee
  • CLOSE_DATE between date variables of vDefectStart and vDefectEnd
  • DETECT_DATE before vDefectStart

=Count({$<CUR_STATUS = {'Closed'},DEFECT_ID=P({<CLOSE_DATE={">=$(vDefectStart)<=$(vDefectEnd)"},DETECT_DATE={"<$(vDefectStart)"}>})*E({< PRIMARY_DECISION_BODY ={'SMG Committee'}>})>}DISTINCT DEFECT_ID)

vishsaggi
Champion III
Champion III

Try this?

=Count({$< DEFECT_ID = P({< CUR_STATUS = {'Closed'},

                            CLOSE_DATE = {">=$(vDefectStart)<=$(vDefectEnd)"},

                            DETECT_DATE= {"<$(vDefectStart)"}>})

                            *

                       E({1< PRIMARY_DECISION_BODY ={'SMG Committee'}>})>}DISTINCT DEFECT_ID)

cbaqir
Specialist II
Specialist II
Author

Does not return anything.

vishsaggi
Champion III
Champion III

Clear the selections from current selection box and try.

antoniotiman
Master III
Master III

It seems to work.

cbaqir
Specialist II
Specialist II
Author

It doesn't seem to be responsive to my calendar variables?

cbaqir
Specialist II
Specialist II
Author

Nor does it work in the table chart.

cbaqir
Specialist II
Specialist II
Author

Shouldn't there be variable dates in the current selections? Why would it work when those are cleared?