6 Replies Latest reply: Nov 4, 2014 1:36 AM by Ashfaq Mohammed

Using  Set Analysis  for date comparison as expression

Hello,

I am developing a simple table in qlikview .the  dimension for table  named "customer_payment "its fields are "customername", "duedate","dueamt","paiddate","paidamt".

i am trying to design a simple pivot table which show the sum of all those customers who have paid thier dues the same day as thier duedate.

I am currently using  set analysis ie

sum({<duedate={"=paiddate "}>}paidamt )

for finding the sum of payment on the same day but its not working .

I also tried  the "if()" condition like -

sum( if(duedate=paiddate,paidamt,0)

this expression seems to work but i was wondering if the same result can be achieved throught Set Analysis .

I am attaching a demo application

Thanks and Regards ,

s_tushar

• Re: Using  Set Analysis  for date comparison as expression

You can make it like that ;

sum({< duedate=p(paiddate) >}paidamt )

BR

• Re: Using  Set Analysis  for date comparison as expression

Thanks

• Re: Using  Set Analysis  for date comparison as expression

can you elaborate what this function P() do  ?

• Re: Using  Set Analysis  for date comparison as expression

Hi,

P() function is used to show the possible result for the expression.

In you example P shows, all possible paiddate is equivalent to duedate then it shows the paidamount

Regards

Suresh Rawat

• Re: Using  Set Analysis  for date comparison as expression

Also instead of P we use E function then it shows the paidamound based on all the duedate is not equal to the paiddate.

• Re: Using  Set Analysis  for date comparison as expression

Hi,

Check this too.

http://community.qlik.com/docs/DOC-4951

Regards

ASHFAQ