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

Creating Conditional Flags in Script

Hi All,

I am trying to create a conditional flag/statement in a QV script on a QVD that needs some streamlining

The data is pulled in via ODBC and contains mainly SQL and Excel connections.

I am trying to write a statement using fields from multiple locations to create a flag to make analysis a lot easier.

So far I am at

if(ValueID='*24*' and IncidentType='*Accident*')and ([ListTitle]='*Employee*',0,1,) as 7DayFlag

I know this is probably wrong but can anyone point me in the right direction as to how to make this a flag

Thank you in advance


31 Replies
Not applicable
Author

No you can create it from your table data like below...

Name:

sql load query;

store Name into anyname.qvd;

& i saw your data lot of work we need to do.But Take list box in your app & play with them to find why it is showing wrong result.Also while passing any data range in set analysis always try to match format of data with fieldvalue by which you are comparing it.

ex: IMSMonthYear='jan-2014'

      IMSMonth='jan'

      IMSYear='2014'

IMSMonthYear='01-01-2014'  will never returns right result.



Not applicable
Author

Thanks Harshal

I need to have a look through a lot of the script and try to improve on it

The IMSMonthYeah thing is weird though as in the Master Calendar I have it as

(monthstart(TempDate), 'MMM-YYYY') as IMSMonthYear,  

The Date Raised format is DD-MM-YY hh:mm:ss though which could be half the problem