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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis complex condition in modifier

Hi all,

I was wondering if its possible to have a complex condition in modifier. For example I have a field RollingMonths which is of form "MMM-YYYY" (ex. 'May-2012') and I would like to create a comparision using current month and year. I've tried few different methods however none seem to work.

sum( {1<RollingMonth = {$(=date#(date(today),'MMM-YYYY'))}>} Units )

or

sum( {1<RollingMonth = {$(=month(today()) & '-' & year(today())))}>} Units )

I know the last option would be to create a variable.

Best regards,

Grif

2 Replies
Anonymous
Not applicable
Author

Grif,

Assuming that the RollingMonth field is text, your second expression should work with after a minor fix:

sum( {1<RollingMonth = {"$(=month(today()) & '-' & year(today()))"}>} Units )

I added quotes and removed extra ')'

If RollingMonth is numeric, your first expression maybe is closer to the correct one (except qoutes are missing and today has no '()') - but the exact syntax depends on how RollingMonth is defined.

Regards,

Michael

Not applicable
Author

Thank Michael,

I will try it and post my results.

Grif