- It's possible to create ranges for dates, whole or decimal numbers when part of a DR.GET function.
- Such ranges can be added as parameters using the DR.Range function in the Excel Add-in.
- The DR.Range function is not applicable for text or boolean (true/false) data types.
Use Case
Let's say your organization works on a 4-4-5 schedule (or any unique fiscal year), then you can use the Dynamic Ranges to give you more flexibility in how you calculate your reports.
DR.Range Syntax
The basic syntax for DR.Range is DR.Range (Value1, Value2).
Here are some examples.
Required Range | Syntax |
---|---|
Dates between 01/01/21 and 8/31/2021 | DR.Range(DR.Date(“01/01/2021”),DR.Date(“08/21/2021”) |
Account Numbers between 4000 to 5000 | DR.Range(4000,5000) |
Excel Cell Ranges A2…A5 (can be date or number data types) | DR.Range(A2, A5) |
The function DR.Range requires DR.Date when using a range of hard coded dates. If Excel cell ranges are used, then DR.Range does not require DR.Date.
Syntax for DR.Range in a DR.Get Function
The syntax to get the value of the field ‘Amount’ between the start dates 1 January 2021 and 31 August 2021 is:
DR.Get(Amount,"[StartDate]".DR.Range(DR.Date(“01/01/2021”),DR.Date(“08/31/2021”)))
Create a DR.Range Expression Using the Field Selector
Example: We shall enter the function using the DataRails Field Selector. The function will fetch values within the date range 1 January 2019 and May 1 2019.
- Click the cell where you want the function.
- Go to the Excel formula bar, right-click and select DataRails > Parameters.
- The Field Selector dialog box opens. Complete the Field Selector as shown.
- Select a field with the correct data type (date, whole number or decimal). In this example the field selected is Period.
- Checkmark the start date and the end date.
- Select Values in Range (DR.Range).
- Check mark Add as last parameter.
- Click OK. The completed function will appear in the formula bar.
Use the reference date (date picker) in DR Formulas
- The Reference date (Date Picker) applies a date filter to a dataset. The filter is available in three (3) locations:
- DataRails ribbon Filter>Add Date Picker
- DataRails ribbon as a hyperlink (see the above image)
- Dashboard header
- When you select a date, you can select the time dimension (time range) for the filter.
For example, today, month to date, year to date, quarter to date and so on). - You can then use the DR function DR_DATE_PICKER in a formula and it will return the data based on the date range you have set.
- Example: Your formula might be =EOMONTH(DR_DATE_PICKER,-1).
- To update the date for a different date range, simply change the date using Date Picker.
© Datarails Ltd. All rights reserved.
Updated
Comments
0 comments
Article is closed for comments.