Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

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
Highlighted
Champion III
Champion III

Check this attached?

View solution in original post

30 Replies
Highlighted
Creator
Creator

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)

Highlighted
Specialist
Specialist

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

Highlighted
Partner
Partner

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

Highlighted
Champion III
Champion III

Try this:

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

Highlighted
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.

Highlighted
Specialist
Specialist

error

Highlighted
Specialist
Specialist

error in expression

Highlighted
Specialist
Specialist

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

Highlighted
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!!!