Skip to main content
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)

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Check this attached?

View solution in original post

30 Replies
Anonymous
Not applicable

What are you trying to count?. I can see that date variables was wrong... Try this and let me know if it works

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

cbaqir
Specialist II
Specialist II
Author

trying to count Distinct DEFECT_ID... the expression says okay but the result says Error in set modifier function set

NZFei
Partner - Specialist
Partner - Specialist

=count({$<DETECT_DATE= {">=$(vDefectStart)<=$(vDefectEnd)"}, PRIMARY_DECISION_BODY -={'SMG Committee'}>}distinct DEFECT_ID)

vishsaggi
Champion III
Champion III

Try this:

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

tresesco
MVP
MVP

Try like:

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

OR

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


Note: 'and' removed and changes made in red (corrections in brackets, comma..). If your variable producing right output in right format, it should work.

cbaqir
Specialist II
Specialist II
Author

error

cbaqir
Specialist II
Specialist II
Author

error in expression

cbaqir
Specialist II
Specialist II
Author

This returns a number but it's lower (1027) than I expected (1331). I will look into it. Thanks!

vishsaggi
Champion III
Champion III

Try this:

= count(

         {<

               DETECT_DATE= {"$(= '>=' & $(vDefectStart) & '>=' & $(vDefectEnd))" }> * < e({1< PRIMARY_DECISION_BODY = {'SMG Committee'} >} )

          >}

          DISTINCT DEFECT_ID

       )

IF doesn't work can you share your sample to look into please!!!