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: 
anjali0108
Partner - Creator III
Partner - Creator III

Closed on this month

Hi Experts,

I am using below formula to showcase numbers that are closed on this month:

CommonDateNum={">=$(=Num(MonthStart(Max(CommonDateNum)))<=$(=Max(CommonDateNum))"

But I can see that there are still some tickets that are not coming after applying this condition,i thought that "=" is not working in the below condition,so I added -1 in the expression to consider all values.

CommonDateNum={">=$(=Num(MonthStart(Max(CommonDateNum))-1))<=$(=Max(CommonDateNum)-1)"

Please let me know if this condition is fine or do I need to change something....

Thanks in advance.

12 Replies
PrashantSangle

Hi,

What is your CommonDateNum Format??

Make modification as per CommonDateNum Format.

Use Date() to format your date in set analysis

max(CommonDateNum) -----> returns date in numeric format.

For debugging your script test output of your expression in text object

create 2 text object 1 with expression

=Num(MonthStart(Max(CommonDateNum))-1)

2nd with

=Max(CommonDateNum)-1

Both output format match with you CommonDateNum format.

Regards,

Prashant

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 🙂
anjali0108
Partner - Creator III
Partner - Creator III
Author

Yes, i tried this flag but when I am selecting "1",it is selecting "MAY 2017".

Yes,my date field has both date and timestamp in it.,

vinieme12
Champion III
Champion III

then try as below

FABS(inmonthtodate(Timestamp#(<Datefield>,'DD/MM/YYYY H:mm:ss'),today()-1,0))  as MTDFLAG

Replace with your datefield format   'DD/MM/YYYY H:mm:ss'

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.