Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Expression

Hi All,

Can any one explain me what is the meaning of the below expression. what this expression will ?

count({<Date={">=$(=AddMonths(Today(),-6))<=$(=Today())"}>}DISTINCT Product)

Regards

John

1 Solution

Accepted Solutions
sunny_talwar

This expression means:

Count all distinct products which are available within last 6 months

View solution in original post

3 Replies
sunny_talwar

This expression means:

Count all distinct products which are available within last 6 months

alexandros17
Partner - Champion III
Partner - Champion III

count({<Date={">=$(=AddMonths(Today(),-6))<=$(=Today())"}>}DISTINCT Product)

You count the distinct product with following conditions (Explicited by set analysis)

(A) AddMonths(Today(),-6) is a date starting 6 months before today

the whole condition ">=$(=AddMonths(Today(),-6))<=$(=Today())" says that the field Date must be

>=(A) and <= today

and finally you have to know that if you write (=Expression) the expression is evaluated so in your case

$(=AddMonths(Today(),-6))

computes the function Addmonths

Hope this helps

hcabrera
Contributor III
Contributor III

Hi,

This expression does is count the different products dated from 6 months ago ">=$(=AddMonths(Today(),-6) to less equal to today <=$(=Today())"