Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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!!

Labels (1)
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.