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: 
Anonymous
Not applicable

Month Count

Hi All,

Please if any one can help me on the solution.

I need to get the data for the previous months. For Eg:- If year is 2017 and Month selected is April then i should get the count records of (Jan+Feb+March+April). If i click March then it should get the count records of (Jan+Feb+March)

its bit urgent.

Thanks in Advance!!

1 Solution

Accepted Solutions
devarasu07
Master II
Master II

Hi,

Refer to the attached sample,  just use below kind of expression (productid changed to your field)

for the count,

Count({$<Year = {$(=max(Year))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} ProductId)

Sales.png

View solution in original post

4 Replies
vishsaggi
Champion III
Champion III

Can you share a sample to look into and work on?

devarasu07
Master II
Master II

Try like this,

SUM({$<Year = {$(=max(Year))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} SoldQty)

devarasu07
Master II
Master II

Hi,

Refer to the attached sample,  just use below kind of expression (productid changed to your field)

for the count,

Count({$<Year = {$(=max(Year))}, Month = {"<=$(=max({<Year={$(=max(Year))}>} Month))"}>} ProductId)

Sales.png

Anonymous
Not applicable
Author

Thanks Devarasu. This is what i was looking for.