Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
change line no 11 under calendar tab Resident New_GeneralData;
Hi,
if(ValueID='*24*' and IncidentType='*Accident*')and([ListTitle]='*Employee*',0,1,) as 7DayFlag
Is above are from same table?
If yes add this expression in preceding load and proceed.
Thanks for the reply Krishna, but no the fields are loaded in separate tables
use this,
IF(wildmatch(ValueID,'*24*') and wildmatch(IncidentType,'*Accident*') and wildmatch(ListTitle,'*Employee*'),'0','1' ) as Flag
Try like below,
if(wildmatch(ValueID,'*24*') and wildmatch(IncidentType,'*Accident*') and wildmatch([ListTitle],''*Employee*'),0,1) as Flag
Thanks for the answers
It still does not seem to work and I get an error.
Being a complete newbie can this go on a separate line on a new tab or does it need more syntax or to be in the same tab as the load?
Hi,
I think you can achieve it by using Apply Map concept.
the above sytanx tested and it's working..
if possible share ur .qvw?
I have attached the QVW it is very much a work in progress.
Datasource has caused a predecessor a lot of headaches and I am trying to go through and streamline it
Hi,
In Data modeling you need to try like below ,
GeneralData:
//data load;
left join(GeneralData)
mel_InjuryAccidents:
//data load;
left join(GeneralData)
search_Incident_StatusFlags:
//data load;
Noconcatenate
New_GeneralData:
LOAD
*,
if(wildmatch(ValueID,'*24*') and wildmatch(IncidentType,'*Accident*') and wildmatch([ListTitle],'*Employee*'),0,1) as flag
Resident GeneralData;
drop table GeneralData;