Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using "Admonths" in expression

Hi all,

I need to count a number of customer using services in last 1m/3m or 6m, so that i set an expression like that:

count({<[TransDate]={'>=$(admonths(today(),-1))'}>} distinct [Cus.No]) ==> for 1M

count({<[TransDate]={'>=$(admonths(today(),-3))'}>} distinct [Cus.No]) ==> for 3M

count({<[TransDate]={'>=$(admonths(today(),-6))'}>} distinct [Cus.No]) ==> for 6M

However, all these three expressions show the same result!

Please help me to correct that expression. Thank you!

Regards,

PhucPV

1 Solution

Accepted Solutions
sunny_talwar

Try with an equal sign within the dollar sign expansion  and also switch single quotes to double quotes and see if that works

count({<[TransDate]={">=$(=admonths(today(),-1))"}>} distinct [Cus.No]) ==> for 1M

count({<[TransDate]={">=$(=admonths(today(),-3))"}>} distinct [Cus.No]) ==> for 3M

count({<[TransDate]={">=$(=admonths(today(),-6))"}>} distinct [Cus.No]) ==> for 6M

View solution in original post

3 Replies
sunny_talwar

Try with an equal sign within the dollar sign expansion  and also switch single quotes to double quotes and see if that works

count({<[TransDate]={">=$(=admonths(today(),-1))"}>} distinct [Cus.No]) ==> for 1M

count({<[TransDate]={">=$(=admonths(today(),-3))"}>} distinct [Cus.No]) ==> for 3M

count({<[TransDate]={">=$(=admonths(today(),-6))"}>} distinct [Cus.No]) ==> for 6M

pablolabbe
Luminary Alumni
Luminary Alumni

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

Anonymous
Not applicable
Author

Yesss, it works great bro! thank you so much for your prompt help!!!