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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Ayden
Contributor III
Contributor III

case statement

hello all,

I am trying to create a field in the front end app, that would use the following case statement and return a status.

 

CASE WHEN Folder_Closed_Date IS NOT NULL AND Folder_Closed_Date <= GetDate() THEN 'Closed'

WHEN Folder_Closed_Date IS NULL OR Folder_Closed_Date > GetDate() THEN 'Pending' ELSE NULL END AS 'Status As Of Today'

 

how could i write the above in qlik as a dimension.

could I use set analysis for this.

Thanks

Labels (3)
1 Solution

Accepted Solutions
NitinK7
Specialist
Specialist

try below expression

If( Len(Folder_Closed_Date)>0  AND Folder_Closed_Date<= GetDate(), 'Closed',
 If( Len(Folder_Closed_Date)=0  OR  Folder_Closed_Date >  GetDate(), 'Pending',  Null() ))

 

View solution in original post

2 Replies
anat
Master
Master

you can create backend field using same condition instead of calculated dim.

if( Folder_Closed_Date IS NOT NULL AND Folder_Closed_Date <= GetDate() , 'Closed',

if(Folder_Closed_Date IS NULL OR Folder_Closed_Date > GetDate() , 'Pending' , 'Status As Of Today'))

NitinK7
Specialist
Specialist

try below expression

If( Len(Folder_Closed_Date)>0  AND Folder_Closed_Date<= GetDate(), 'Closed',
 If( Len(Folder_Closed_Date)=0  OR  Folder_Closed_Date >  GetDate(), 'Pending',  Null() ))