Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create dual if flag statement

Hello, I'm trying to create a compliance flag to add to this current load. this is what i tried, but when i do so, the dates are no longer showing.


LOAD *,

If(Match([Flag],'0-14 days')> 0,'Compliant',

If(Match([Flag],'15-30 days',[Severity] <> 'Critical')>0,'Compliant','Non-Compliant')) as Compliance_Flag

AND

//     If(Flag = '0-14 days', Dual('Compliant', 1),

//     If(Flag = '15-30 days', Severity <> 'Critical', Dual('Compliant', 2),

//     if(Flag = '15-30 days', Severity <> 'Critical', 'Compliant') as Compliance_Flag




Initial load script:


TestCombined:

LOAD Flag,

  Severity,

  IP_Address,

  First_Discovered,

  Plugin_name,

  Repository,

  MonthYear;

    

FROM $(vQVDlocation)CVATest.qvd(qvd)

Where not WildMatch(Severity, 'Medium*', 'Low*', '*Info*');

CONCATENATE(TestCombined)

LOAD

  Flag,

  Severity,

  IP_Address,

  First_Discovered,

  Plugin_name,

  Repository,

  Closed_Mitigated_On,

  MonthYear,

     if(Flag = '0-14 days', 'Compliant'),

     if(Flag = '15-30 days', Severity <> 'Critical', 'Compliant') as Compliance_Flag

    

FROM $(vQVDlocation)CVAClosed.qvd(qvd)

Where not WildMatch(Severity, 'Medium*', 'Low*', '*Info*');

//Create the QVD File

STORE TestCombined into $(vQVDlocation)CVACombined.qvd (qvd);

DROP TABLE TestCombined;

1 Reply
Peter_Cammaert
Partner - Champion III
Partner - Champion III

As we have no clue which dates you're talking about, would it be possible to post an example document with some data that shows unwanted behavior?