I need to display a list with the last 30 dates known. Here is an example:
|Please select a date|
So, I have a date dimension and need to limit this to the last 30 days.
I tried using an If structure to limit the results but it doesn't work since all dates available is shown.
Thanks for your advise!
If those are 30 dates starting today, then
If(Date >= Today() -30, Date)
Anyway, I would create a flag field or a different field in your calendar table and use this in the frontend.
Check the AsOf table concept: The As-Of Table
Date() is just a formatting function and it can't convert text into a number/real-date value. Rather use Date#() to parse your date values during load. Then the expression shared above should work fine at the UI.
Date#(yourTextDateField, 'dateformat <how it looks as text>') as Date
Hi - check out this.
the script uses max function to find out 1st max date,2nd max date etc.
you can change the field names or script, as per your needs.
the same logic applies for your sales date field too.
if you can provide the sample data, it would be good for us to play around with it.