Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mtabernad
Partner - Creator
Partner - Creator

Set analysis Previous month

Hi everyone,

I'm just trying to build an expression through set analysis for previous month:

=count({$<Month={num(month(addmonths(max(date_id),-1)),'00')}>}connect_time)

but I get this error (also shown on attached Image):

Error in set modifier ad hoc element list: ',' or ')' expected

It seems like a "," or ")" is missing but however much I check it I think expression is OK.

Could anyone help me please?

Thank you in advance!

Labels (3)
1 Solution

Accepted Solutions
DavidM
Partner - Creator II
Partner - Creator II

When using formula in set expression you need to use format below (in red):

=count({$<Month={"$(=num(month(addmonths(max(date_id),-1)),'00')"}>}connect_time)

 

This should work if the formula num(month(addmonths(max(date_id),-1)),'00') is ok

View solution in original post

2 Replies
DavidM
Partner - Creator II
Partner - Creator II

When using formula in set expression you need to use format below (in red):

=count({$<Month={"$(=num(month(addmonths(max(date_id),-1)),'00')"}>}connect_time)

 

This should work if the formula num(month(addmonths(max(date_id),-1)),'00') is ok

mtabernad
Partner - Creator
Partner - Creator
Author

Thank you! It works  🙂