Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table that I would like to assign three custom filters to: 30 day, 60 day, and 90 day. Is this possible to do purely through a custom field in the filter pane?
Hi,
In that case you will have to create in script like below.
Load *,Date,
If((Today()-Date) <=30,'30 Days',
If((Today()-Date) >30 and (Today()-Date) <=60,'60 Days' ,
If((Today()-Date) >60 and (Today()-Date) <=90,'90 Days' ,'More than 90 days'))) as Bucket
From xyz;
Use this bucket field as filter or dimension.
Regards,
Kaushik Solanki
Hi,
Yes it is possible for example.
Sum({<Date = {">=$(=Max(Date)-30)"}>}Sales)
It will give the sales for last 30 days.
Regards,
Kaushik Solanki
Thank you for your reply. Your code would give me the sum of sales for the last 30 days. What I am looking for is a filter that would adjust the whole table and have 30 days, 60 days, and 90 days as options.
Hi,
In that case you will have to create in script like below.
Load *,Date,
If((Today()-Date) <=30,'30 Days',
If((Today()-Date) >30 and (Today()-Date) <=60,'60 Days' ,
If((Today()-Date) >60 and (Today()-Date) <=90,'90 Days' ,'More than 90 days'))) as Bucket
From xyz;
Use this bucket field as filter or dimension.
Regards,
Kaushik Solanki
Thank you very much. This accomplishes exactly what I was looking for.