Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vgadang1
Partner - Contributor III
Partner - Contributor III

Values from field from recent dates (past 30 days)

Hi,

I am working on a table to bring messages from a field called "Narrative", and I want to limit the messages from the past 30 days for which I have a date column "Lastupdateddate".

Appreciate any help I can get here.

Thanks,

VG

2 Replies
Chanty4u
MVP
MVP

Try this .

=Sum({<Lastupdateddate={">=$(=Date(AddMonths(Today(), -1), 'YYYY-MM-DD'))<=$(=Date(Today(), 'YYYY-MM-DD'))"}>} Narrative)

 

vgadang1
Partner - Contributor III
Partner - Contributor III
Author

Thank you! I think it is working,  except that I realized my date column's max date is Oct 2022, 

so I changed the code slightly 

=aggr(Sum({<dtg={">=$(=Date(Max(DATE), -1), 'YYYY-MM-DD'))<=$(=Date(Max(DATE), 'YYYY-MM-DD'))"}>} [narrative]), [narrative])

It didnt work, what am I doing wrong?

Thanks,

Vidya