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

Error in Set Modifier ad hoc element list

Hi all,

I'm trying to build a chart that would show the number of leads by marketing sources that were generated yesterday (whenever you're looking at them). Here's the expression I'm using:

Count ( { <Status={'Lead CreatedDate'}, [Lead CreatedDate]={(today())-1}, [Marketing Source]-={'X','Y'},[Marketing Medium]-={'Z'}>}[Lead Id])

The error I'm getting is: Error in Set Modifier ad hoc element list .

I tried to put a $ before (today()), and it made today() be in grey and italics, even the error message was gone, but the chart still showed no data.

Can anyone help me with the syntax?

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

Count ( { <Status={'Lead CreatedDate'}, [Lead CreatedDate]={'$(=Date(today()-1))'}, [Marketing Source]-={'X','Y'},[Marketing Medium]-={'Z'}>}[Lead Id])

Assuming Lead CreatedDate is formatted in standard date format (otherwise add an appropriate format code to the Date() function)

View solution in original post

8 Replies
swuehl
MVP
MVP

Try

Count ( { <Status={'Lead CreatedDate'}, [Lead CreatedDate]={'$(=Date(today()-1))'}, [Marketing Source]-={'X','Y'},[Marketing Medium]-={'Z'}>}[Lead Id])

Assuming Lead CreatedDate is formatted in standard date format (otherwise add an appropriate format code to the Date() function)

Not applicable
Author

Thanks for answering. Qlikview says the expression is OK however the today() is not in blue and more importantly - the chart returns 'no data to display'

swuehl
MVP
MVP

Can you post a sample qvw application?

I assume you might have a format issue, the format of the evaluated date for yesterday must match the format of field [Lead CreatedDate]. And of course, you need to have data for yesterday.

If you use this expression in a straight table chart with no label used for that expression, you should see the evaluated dollar sign expansion when hovering over the column header with the mouse. What do you see?

Not applicable
Author

it shall not be blue when entered in your search string - Make sure your today timestamp is the same as in your data source. or try to this : {"$(=Date(today()-1))"}

Not applicable
Author

ha, you are right! yesterday was saturday so obviously no activity. I did today-4 and got values!

it just seemed strange that the today() function doesn't turn blue. Don't you think?

Thanks a lot!

Not applicable
Author

It doesnt turn blue cause you apply in within a string element like ' or " - But qlikview still knows how to handle it.

Not applicable
Author

thanks for answering!

Not applicable
Author

Hello again,

For some reason, objects using this expression stopped working and either return 0 (a text box I created with = the expression) and a chart. This happens even after I clear everything and select (and after making the same selections as before).

Any idea what might have changed? What I can do? It's very strange,

Thanks!

Al

(Edit: needless to say, there is data in the system for those dates)