Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Date functions within a straight table

I am looking to determine if a transaction date occurred in the last 3 or 6 months in a straight table.  The two fields are FullName and TransactionDate.  I need to find the last transaction date and compare it to today's date and determine if there has not been a transaction within the last 3 months and the last 6 months or greater.  How would I go about doing this?

10 Replies
Gysbert_Wassenaar

Perhaps like this: If([ Today() - TransactionDate > 90 and Today() - TransactionDate < 180 , 'Yes', 'No')


talk is cheap, supply exceeds demand
cliff_clayman
Creator II
Creator II
Author

That gives me the raw data I need, but how do I limit it to just see those names that have not had a transaction within the last 3 and 6 months?

Gysbert_Wassenaar

Please post a small qlikview document with example data.


talk is cheap, supply exceeds demand
cliff_clayman
Creator II
Creator II
Author

Here is some sample data with a straight table. !

Gysbert_Wassenaar

Try

If( Today() -only( {<FullName=E({<TransactionDate={"=TransactionDate>Today()-180 and TransactionDate<Today()-90"}>}FullName)>}  [TransactionDate] ) > 90 and Today() -only( {<FullName=E({<TransactionDate={"=TransactionDate>Today()-180 and TransactionDate<Today()-90"}>}FullName)>}  [TransactionDate] )< 180 , 'No', 'Yes')


talk is cheap, supply exceeds demand
cliff_clayman
Creator II
Creator II
Author

I only want to see the last transaction date if there are multiple dates for a name.  How can I do that?

Gysbert_Wassenaar

Try max(<FullName=E({<TransactionDate={"=TransactionDate>Today()-180 and TransactionDate<Today()-90"}>}FullName)>} TransactionDate)


talk is cheap, supply exceeds demand
cliff_clayman
Creator II
Creator II
Author

There is an error in that expression...

vishsaggi
Champion III
Champion III

Is that flower bracket that is missing Gysbert?

Add Flower bracket highlighed in red and try Cliff...

max({<FullName = E({< TransactionDate={"=TransactionDate>Today()-180 and TransactionDate<Today()-90"}>}FullName)>} TransactionDate)