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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

hi,

just shift ODBC connection string at start of script ..it will work..

Not applicable
Author

Thanks Harshall, I did try that to fix the ODBC issue but it still renders my master calendar obsolete and causes a number of temp issues as your script drops the GeneralData table which the Calendar looks for

Not applicable
Author

change line no 11 under calendar tab Resident New_GeneralData;

Not applicable
Author

This looks to have worked Harshal, thank you for your time and patience in helping me out

Not applicable
Author

No need of it we are improving ourselves with your problems !!

Not applicable
Author

Sorry, but it appears I am getting two New_GeneralData tables and also my master calendar is now not working still (despite the change above)

No errors in the script running but date raised and master calendar fields do not produce the expected outcome

Not applicable
Author

ok, post your application so that we can identify pb..

Not applicable
Author

Thanks Harshall

The Sheet3 tab has a table where I have placed the IMSMonthYear next to the DateRaised column and as you will see only one date is converted properly.

If I create a table with just dateraised and IMSMonth Year it works fine, so am at a loss to where the problem lies, whether it is a join issue or something more deep rooted with the database etc

Not applicable
Author

Hi,

Yes first you reload this file.

>If possible create qvd files from your Sql data.

>Then, give reference to name each table unless it will autoconcatenate your files which is happening in your New_Generaltable.

>Yes may be some linking issue is thrbut first load proper arrange data.

Not applicable
Author

Thanks Harshal, still nothing from that file as in dates still not working. Weird as it works for one date but not the rest!

I will need to research qvd as I have never heard of them before.