# Counting user-stories that have logged time but don't have SPs

**URL:** <https://community.eazybi.com/t/counting-user-stories-that-have-logged-time-but-dont-have-sps/11347>\
**Category:** Questions & Answers\
**Created:** [December 26, 2022, 1:57pm UTC](https://community.eazybi.com/t/counting-user-stories-that-have-logged-time-but-dont-have-sps/11347 "2022-12-26T13:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omer\_Philip](https://community.eazybi.com/user_avatar/community.eazybi.com/omer_philip/32/8650_2.png) [@Omer\_Philip](https://community.eazybi.com/u/Omer_Philip)\
**Post date:** [December 26, 2022, 1:57pm UTC](https://community.eazybi.com/t/counting-user-stories-that-have-logged-time-but-dont-have-sps/11347/1 "2022-12-26T13:57:50Z")

</div>

Trying to create a report that aggregates per project the amount of user-stories that have logged time but don’t have story points.

Ex.  
Project 1 | xx stories  
Project 2 | xx stories  
Project 3 | xx stories

When using the following an “Out of Memory” error appears.

Count(  
Filter(  
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),  
NOT IsEmpty([Measures].[Hours spent]) AND  
([Issue Type].[Story]) \> 0 AND  
IsEmpty([Issue].CurrentHierarchyMember.Get(‘Story Points’))  
)  
)

---

<div class="post-metadata">

**Author:** ![Elita.Kalane](https://community.eazybi.com/user_avatar/community.eazybi.com/elita.kalane/32/14957_2.png) [@Elita.Kalane](https://community.eazybi.com/u/Elita.Kalane)\
**Post date:** [December 30, 2022, 8:19am UTC](https://community.eazybi.com/t/counting-user-stories-that-have-logged-time-but-dont-have-sps/11347/2 "2022-12-30T08:19:22Z")

</div>

Hello @Omer_Philip,

Most likely, your report has many projects in Rows that cause the report timeout.  
My recommendation would be to create a new dimension with JavaScript code. You can do that in [eazyBI settings](https://docs.eazybi.com/eazybi/data-import/data-from-jira/jira-custom-fields/advanced-settings-for-custom-fields) → [Advanced Settings](https://docs.eazybi.com/eazybi/data-import/data-from-jira/jira-custom-fields/advanced-settings-for-custom-fields#Advancedsettingsforcustomfields-Additionalcustomfields) by pasting the code below.

```auto
[jira.customfield_loggedtime]
name = "Issues with Logged time"
data_type = "string"
dimension = true
javascript_code = '''
if (issue.fields.timespent > 0) {
if (issue.fields.customfield_10400) {
issue.fields.customfield_loggedtime = "Logged time with SP";
} else {
issue.fields.customfield_loggedtime = "Logged time without SP";
}
} else {
issue.fields.customfield_loggedtime = "No logged time";
}
'''

```

Once you have saved your settings, import your custom field as a dimension (Account → Source file → Jira import options → [​Custom fields​](https://docs.eazybi.com/eazybi/data-import/data-from-jira#DatafromJira-JiraCustomFields)).  
When you have added the new dimension in Pages, you can filter the report on the required parameter (Logged time without Story Points).

![947d267eba4517949987b8cf22076920.png](https://community.eazybi.com/uploads/default/original/2X/d/d29ab86e4d370cb2bbef1ec8de9fd429227f1381.png)

Please don’t hesitate to contact me if you need any more information.

Elita from [support@eazybi.com](mailto:support@eazybi.com)

---

<div class="post-metadata">

**Author:** ![zane.baranovska](https://community.eazybi.com/user_avatar/community.eazybi.com/zane.baranovska/32/7209_2.png) [@zane.baranovska](https://community.eazybi.com/u/zane.baranovska)\
**Post date:** [December 30, 2022, 12:06pm UTC](https://community.eazybi.com/t/counting-user-stories-that-have-logged-time-but-dont-have-sps/11347/3 "2022-12-30T12:06:39Z")

</div>

Hi @Omer_Philip,

There are several approaches how to count issues with logged hours and without any Story points. The solution with the JavaScript calculated field “Issues with Logged time” would work nicely.

Here is another alternative for consideration.

1. Import **“Story Points”** as a **dimension**. This would allow you to see how issues are distributed by story points and quickly see which issues have (none) story points. Most likely you can re-use this dimension in some other reports.

2. Now you can update the calculated measure and use a much faster expression - a tuple of measures Issues with hours spent, issue type Story and Story points **(none)**.

Best,  
Zane / [support@eazyBI.com](mailto:support@eazyBI.com)
