Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
andrespa
Specialist
Specialist

Set analysis problem with greater than date

Hi everyone!

We have a little problem that it's quite common and for what we found lots of examples within the community, but estill we are not able to do it right.

We have this set analysis:

=count({DATE_FC ={"<= $(=AddMonths(Today(),-6))"} >}ID_PROCEDIMIENTO_aux)


We can't figure out what's wrong, someone could please give us a hand.


Thanks in advance.


Andrés

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

HI,

Try this

=count({DATE_FC ={"<=$(=AddMonths(Today(),-6))"}>}ID_PROCEDIMIENTO_aux)


You can get many examples from below link


Set Analysis for certain Point in Time


Hope this helps you.


Regards,

Jagan.

View solution in original post

13 Replies
PrashantSangle

Hi,

firs check your dateformat of DATE_FC and =Addmonths(Today(),-6)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
santhosh_k_n
Creator II
Creator II

hi,

You had missed an angular bracket '<' after starting the set.

Please check.

BR,

SK

tamilarasu
Champion
Champion

I guess your DATE_FC field format must be mismatching. What is your date format.

=count({DATE_FC ={"<= $(=Date(AddMonths(Today(),-6)), 'MM/DD/YYYY')"} >}ID_PROCEDIMIENTO_aux)


Change the highlighted format with your field format.

andrespa
Specialist
Specialist
Author

Hi Tamil, done. But still incorrect.

tamilarasu
Champion
Champion

Hi Andres,

Did you check the angular bracket as said by Santhosh.

=count({<DATE_FC ={"<= $(=Date(AddMonths(Today(),-6)), 'MM/DD/YYYY')"} >}ID_PROCEDIMIENTO_aux)

.

andrespa
Specialist
Specialist
Author

Yes Tamil, that was ok from the beginning. It was a transcription error.

tamilarasu
Champion
Champion

Andres. What is the result you are getting now.? Could you post your application?

santhosh_k_n
Creator II
Creator II

Hi,

can you save the addmonth function into a variable and asign the variable in set and try.

hope that helps

BR,

SK

andrespa
Specialist
Specialist
Author

We're getting zero as a result, but we know for sure that there's more than 2000 dates that fullfil the condition. It's sintaxis for sure, because even when we put this:

=count({<FECHA_HITO_FORMATO ={"<= 20/11/2015"} >}ID_PROCEDIMIENTO_aux)


or  this:


=count({<FECHA_HITO_FORMATO ={"<= '20/11/2015'"} >}ID_PROCEDIMIENTO_aux)


It doesn't work!!!