Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
cbaqirdhds
Contributor 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
Esteemed Contributor III

Re: Date Variables with Set Analysis

Check this attached?

30 Replies
daniel_sanchezm
Contributor

Re: Date Variables with Set Analysis

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)

cbaqirdhds
Contributor II

Re: Date Variables with Set Analysis

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

xufei123
Valued Contributor

Re: Date Variables with Set Analysis

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

vishsaggi
Esteemed Contributor III

Re: Date Variables with Set Analysis

Try this:

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

MVP
MVP

Re: Date Variables with Set Analysis

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.

cbaqirdhds
Contributor II

Re: Date Variables with Set Analysis

error

cbaqirdhds
Contributor II

Re: Date Variables with Set Analysis

error in expression

cbaqirdhds
Contributor II

Re: Date Variables with Set Analysis

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

vishsaggi
Esteemed Contributor III

Re: Date Variables with Set Analysis

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

Community Browser