Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ravikumar_iyana
Creator
Creator

How to show difference between two date fields

Hi,

I have a two fields NR, IRB.

  1. NR>30 DAYS to IRB Date ,   required result:Processing, Late Payment.
  2. NR<30 DAYS to IRB Date ,   required result: on time payment.
  3. when  to IRB Date is value: '-' ,    required result: Processing.
  4. NR we will calculate based on system date required, entered more than system date required result: entered wrong date.

note: I required all these expressions in set analysis only.

  1. I'm tried for this :

If([IRB] = '-', 'Processing',


     If([IRB]- [PaymentDate NR] < 30, 'On Time Payment', 'Late Payment'))

** i want to convert if() into set analysis**

NRIRB
10-Jan-1713-Jan-17
26-Jan-1702-Feb-17
31-jan-1710-feb-17
20-feb-175-apr-17
5-feb-17-
10-mar-175-jun-17
5-apr-17-

Advance Thanks,

Ravi.

8 Replies
zebhashmi
Specialist
Specialist

i think

if (IRB-NR>30,Late Payment,time payment)

ravikumar_iyana
Creator
Creator
Author

Hi,

I want to satisfy all 4 conditions in one expression.

krishna_2644
Specialist III
Specialist III

Check this out.1.PNG !

ravikumar_iyana
Creator
Creator
Author

Hi Required all those expressions in Set analysis only.

krishna_2644
Specialist III
Specialist III

Use NR and IRB as dimensions.

Measure:

=If((if(IRB = '-',0, NUm(Date#(IRB,'DD-MMM-YYYY')))- NUm(Date#(NR,'DD-MMM-YYYY')))>30, 'Processing,Late Payment',

   If((if(IRB = '-',0, NUm(Date#(IRB,'DD-MMM-YYYY')))- NUm(Date#(NR,'DD-MMM-YYYY')))>0 and

      (if(IRB = '-',0, NUm(Date#(IRB,'DD-MMM-YYYY')))- NUm(Date#(NR,'DD-MMM-YYYY')))< 30 , 'on time payment',

      If((if(IRB = '-',0, NUm(Date#(IRB,'DD-MMM-YYYY')))- NUm(Date#(NR,'DD-MMM-YYYY')))<0, 'Processing')))

check attached.

ravikumar_iyana
Creator
Creator
Author

Hi,

you can please help me.

I required all if()expressions into set analysis only.

Thanks,

Ravi.

krishna_2644
Specialist III
Specialist III

Just wondering if you want the result or set expression.

If you want to write this into set expression then you have to have all the text values pre-defined.

krishna_2644
Specialist III
Specialist III

And set expression is mainly for defining sets,and its not used to pre define text values like what you do with if() and pick() expressions.