0
votes

I want to get number of months user selected using Relative Dates Filter? If user entered "Last 3 Months" then I wants to get number of days for 3 months to use these days in another calculated field. Calculated field which is using this is as follows.

([Total Sale within Entered Date]/[Number of Days])*365

which returns me predicted sales for the whole year.

Here, [Number of Days] is the filter which I am using. Picture added for Relative Dates filter I am using.

Screenshot of Relative Date Filter:

Screenshot Relative Date Filter

1
do you want to select number of days between months or select number of days in a filter?Siva

1 Answers

1
votes

You need to create a calculated field that works out the number of days in the data.

Something like datediff('day',min([dates]),max([dates])) if data is present for all the days in the time period will work. This calculation will dynamically give you the number of days between the first and last date in the [dates] field for whatever data is selected by the filter (so won't be precise if not all the possible dates are represented in the dataset).