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

Flag Creation Help

Hi Experts,

Can any one please help me on below requirement.

I have used the below condition to get the output in below table but not getting correctly. I am getting all No in 3 rows.

Please help me on this.

Load

ID,

Start Date,

End Date ,

Prod ,

 Indication,

  Style ,

   if( Trim(Prod)= 'Mobile' and Indication='C'  and    Style = 'Compact '    and ( Year([ Start Date]) - Year([End Date]))<=3,'Yes','No') as Output

From …

 

ID                      Start Date          End Date                         Prod                 Indication               Style                              Output

145863         05/01/2019           08/12/2019                   Mobile             A                                      -                                    No

145863        05/01/2019            08/12/2019                   Mobile             B                                     -                                    No

145863        05/01/2019           08/12/2019                    Mobile             C                                   Compact                     Yes

3 Replies
Gysbert_Wassenaar

I see you have a trailing space in the condition Style = 'Compact '. Check that you really need that space to check the values. Or use the Trim function like you do for Prod. And make sure your dates Start Date and End Date are actually date values and not just strings that only look like dates. Use the Date# function if necessary to convert string values into data values.

talk is cheap, supply exceeds demand
mahitham
Creator II
Creator II
Author

Hi,
Actually in the original app I have given all the conditions as correct but here one ID satisfying both conditions and this ID is coming from one table and the remaining all the fields are coming from another table. Am I need to use any aggregation function here.
The dates also working fine. When I do ( Year([ Start Date]) - Year([End Date])) its showing correct results.
mahitham
Creator II
Creator II
Author

Hi @sunny_talwar

Could you please help me on above issue.