Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
HClegg
Contributor
Contributor

Using a date range as a calculated value filter

I've created a table to analyse deadstock (non-selling stock) in our organisation and have added the below objects into the table for data visualisation:
- Brand name of deadstock product (Row dimension)
- Product Code (Row dimension)
- Product Description (Row dimension)
- Physical stock on hand count (measure)
- Net cost of product (measure)
- Most Recent Sale Date (measure)
- Product created date (measure)

Deadstock is defined as: 
- Any product that hasn't sold in 3 months 
- Has a Product Created Date older than 6 months

Now, I'm trying to add a filter to the table based on the above criteria, this is where I'm encountering the issue. When I try to add PRODUCT_CREATEDDATE as filter type condition -> set to compare -> condition: greater than fixed value -> AddMonths(today(), -6)


This doesn't return anything, probably due to the fact I'm using Qlik code in specify the fixed value, but I wanted this value to be dynamic. 

HClegg_2-1706717955267.png

 

 

Labels (1)
1 Reply
brunobertels
Master
Master

Hi 

May be if today() is corresponding to MAX  ( PRODUCT_CREATEDDATE ) 

then  (AddMonths(MAX  ( PRODUCT_CREATEDDATE ) , -6)