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!
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)
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)
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'
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?
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))"}
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!
It doesnt turn blue cause you apply in within a string element like ' or " - But qlikview still knows how to handle it.
thanks for answering!
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)