How to filter a table based on range of custom date field

Hi,

Can anyone help me with this question?

I have a table where I display the sum of ‘Original Estimate’ hours based on Assignee and Project.

Additionally, I have a custom field called ‘Target Start.’ I have added this field to the Jira import options, and it can be seen in Measures as ‘Issue Target Start.’

I would like to add a filter to the table so that users can choose a date range for ‘Target Start.’ How can I achieve this?

Hi,
Thank you for reaching out to eazyBI community!

Measure Original estimate hours is related to issue creation date only and ‘Issue Target Start’ is a property field. Issue property field values are displayed in the report only when you use Issue dimension Issue level members in report, not when data is aggregated.

Here are the steps to achieve your reporting needs:
(1) Import “Target Start” date as a measure.
(2) Create a new calculated custom field that mimics “Original estimated hours” with javascript code. As a custom measure it will automatically be related to all default dates and any other date you are importing into eazyBI as a measure.

Here is a JavaScript for Original est. hours (I used abbreviation because name can not be exactly the same as for existing measure):

if (issue.fields.timeoriginalestimate) 
return issue.fields.timeoriginalestimate / 3600.0;

Use this javascript when adding new custom field in Source Data Jira import options Custom fields tab.

Save and select it for import as a measure and as a property and run an import. Import will create new measures with any date (Original est. hours with due date, Original est. hours with target start, Original est. hours with custom date, etc.) and property Issue Original est. hours in your account.

When the import is run, you can use the new measure in the report and use Time dimension to filter by the target start date.

If needed, create new calculated members in the Time dimension to filter time in specific ways using both exact and relative dates.

I hope this helps.

Kindly,
Ilze

1 Like

Hi @ilze.krauze , thank you a lot for the explanation. I followed the steps you described and removed the aggregation. My results are similar to yours. However, I don’t understand how to add a date filter. For example, I need to show issues with a Target Start date from February 1st to 10th. I want to give the user the possibility to choose dates for the date range. The issue from the screenshot has a Target Start date of February 4, 2024. How can the value 713.12 help me build this?

image

@ilze.krauze hi again, please ignore the previously message, I understood how to use it :slight_smile: But I still have a some questions, maybe you can help me with them?

  1. How to show a table with aggregated original estimate hours, including issues with and without Target start?
  2. Is there are any way to show in pages area two fields to provide users with a possibility to chose dates range without knowledge how to use dynamic date filters?

Hi AlenaS,
Happy to hear you figured out some parts yourself!
About additional questions:

  1. I’m not sure I understand this one. If you have Time dimension in your report and choose specific month, how would you want to see count of issues without Target start date? Where would you want this number to be added? Or do you need this for a list of issues only?

  2. eazyBI does not have date prompts. However, there are two similar options:
    The closest option is to change the row filter (note - this is available for User role and higher).


    To create row filter click on the column header [1.], then select “between” operator [2.] and write the period start and end (here are all the options how to write GitHub - mojombo/chronic: Chronic is a pure Ruby natural language date parser.). Once the row filter is created, you can click on it and change the dates again [3.].

Another option would be to think about 5-10 most often used options (as “Since last Monday”, “This week”, “First half of month”) and create calculated members in the Time dimension. Users then can select one of the several available calculated members OR switch to multiple values and select several separate dates:

I hope this helps and let me know you have more questions.

Best,
Ilze

"Hi @ilze.krauze, thanks for the explanations.

Regarding the first question, let me clarify my case. My issues have an Original Estimate, Assignee, and Target Start date. All fields are optional. I display the sum of Original Estimate hours by Assignee for all issues assigned to this person, and it doesn’t matter if the issues have a Target Start date. Additionally, my users need the possibility to add a date filter for this table based on the Target Start date gap. In this case, I need to show a table with the sum of Original Estimate hours by Assignee, but only for issues that have a Target Start date within the user’s date filter range.

Regarding the second question, thanks. Yes, I saw all these methods. I just don’t think they are plain and simple for users because all popular BI systems give the user an option to choose the exact date from the calendar for the start or end period. In Eazy BI, this option is hidden, and you also need to write the full date range. It’s just unusual, and I’m worried users will not be able to manage it by themselves.

Hi,
You could create another measure with following formula:

CASE WHEN
[Time].CurrentHierarchyMember 
  IS [Time].CurrentHierarchy.DefaultMember
THEN 
  NonZero([Measures].[Original estimated hours])
ELSE
  NonZero([Measures].[Original est. hours with target start])
END

This formula is based on the member that is selected in Time dimension. If it is default “All Times” then original estimated hours will be shown regardless if there is Target Start date or not. If specific time period is selected, then only those hours where target start is in the selected period will be shown.

Regarding user experience: I still would suggest creating 5-10 most needed options as members in Time dimension and also explain that they can select multiple dates from the list. Maybe they will like it in the end.

Kidly,
Ilze

1 Like

Thanks for you help @ilze.krauze