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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
RimDataAnalyst
Contributor III
Contributor III

If Clause Qlik sense

Hello ,

I calculated the time between the planned deployment date of an alert and the actual deployment date.
and in a table I want to calculate the number of alerts that are delayed and the number of alerts that are on track and the alerts or dates are not filled in.
here is the formula I used to display for each alert whether it is late or not

if (([Days (Planned-Current)]<0) , 'Retarded', 'On track' )

RimDataAnalyst_0-1658173719796.png

 

Labels (3)
1 Solution

Accepted Solutions
RimDataAnalyst
Contributor III
Contributor III
Author

i added the if clause to the Loading script and it works very well .

Thank you all

View solution in original post

7 Replies
sidhiq91
Specialist II
Specialist II

@RimDataAnalyst  Please use the below expression

if(interval(Planned-Current ,'DD')<0,'Retarded', 'On track')

If this resolves your issue, please like and accept it as a solution.

RimDataAnalyst
Contributor III
Contributor III
Author

Thank you for your answer , I already calculate the difference between the two days in [Planned current day ] i only want to count the number of on track if the [Planned current day ] is positive and retarded if it's negative.

MayilVahanan

Hi

Sum(if (([Days (Planned-Current)]>=0),1)) for Track

If its in KPI:

Sum(Aggr(if (([Days (Planned-Current)]>=0),1), urdimensions))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
RimDataAnalyst
Contributor III
Contributor III
Author

 doesn't work 😞  , thank you for your answer 

MayilVahanan

Hi

Can you pls provide sample data?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
RimDataAnalyst
Contributor III
Contributor III
Author

i am sorry i am working with confidential data of aviation i can't publish it 

RimDataAnalyst
Contributor III
Contributor III
Author

i added the if clause to the Loading script and it works very well .

Thank you all