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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
eddywong71
Creator
Creator

Month Filter auto select the latest month

Hi All,

I know that Edit Sheet >Actions >Select Value matching search criteria can control the filter. 

My data format as below.

Load

Date#([Month],'YYYYMM') as [Month].

In other expression:

Count({Month ={'$(vMaxMonthYear)'}>} distinct [Student]). 

vMaxMonthYear=Date(max([Month]), 'YYYYMM').

Which can count the latest month Student.

However, I don't know how to write a expression to auto select latest month in the Month filter

 

 

Labels (5)
2 Replies
Padma123
Creator
Creator

Hi,

Create variable like

vMaxMonthYear->=max(month)

expression

Count({Month ={"$(=vMaxMonthYear)"}>} distinct [Student]). 

MatheusC
Specialist III
Specialist III

Hi, @eddywong71 
Is your [Month] field before creating the new [Month] field a Date field?


It is also important to check that the way in which YYYYMM was defined is not repeating the date value multiple times. If the formatting of the new [Month] field is correct in this format YYYYMM , the creation of the variable is correct.

So it would be just adjusting your expression that is missing the < sign within the set analysis.


Count({<Month ={'$(vMaxMonthYear)'}>} distinct [Student])


- Regards, Matheus

Did you find a solution to your question? Mark the solution as accepted ✅ and if you found it useful, press the like button!