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

Qlikview Date scripting

Hi Need help with the following script, does the format as seem right as far as the if statement.

I am trying to find the value of the new products based on the following equation.

Load

If ( Invoice_Date >= prod_LaunchDate, Value,0) as New_Value ;

SQL select *

From table;

 

Best Regards

1 Solution

Accepted Solutions
Anil_Babu_Samineni

That is right, May be few cases need to be written with number format as

If ( Num(Invoice_Date) >= Num(prod_LaunchDate), Value,0) as New_Value ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

That is right, May be few cases need to be written with number format as

If ( Num(Invoice_Date) >= Num(prod_LaunchDate), Value,0) as New_Value ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Hum1
Contributor II
Contributor II
Author

Hi Anil, for some reason it didn't work.  It's still returning 0 as the value. 

Brett_Bleess
Former Employee
Former Employee

My suspicion would be the date in the backend is not being recognized as a date by QlikView...

Here are some Design Blog posts that may be helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/Why-don-t-my-dates-work/ba-p/1465849

https://community.qlik.com/t5/Qlik-Design-Blog/The-Date-Function/ba-p/1463157

I think those two should hopefully help you move things forward.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.