# CurrentUser Failed to execute query

**URL:** <https://community.eazybi.com/t/currentuser-failed-to-execute-query/5325>\
**Category:** Questions & Answers\
**Tags:** insight, jira\
**Created:** [September 29, 2020, 7:25pm UTC](https://community.eazybi.com/t/currentuser-failed-to-execute-query/5325 "2020-09-29T19:25:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ABRAR\_ALMADI](https://community.eazybi.com/user_avatar/community.eazybi.com/abrar_almadi/32/2944_2.png) [@ABRAR\_ALMADI](https://community.eazybi.com/u/ABRAR_ALMADI)\
**Post date:** [September 29, 2020, 7:25pm UTC](https://community.eazybi.com/t/currentuser-failed-to-execute-query/5325/1 "2020-09-29T19:25:13Z")

</div>

my platform is Jira and my source data is in Insight and one of the dimension is the Assignee on object name Delivery Project when I use this query on the Delivery Project Assignee dimension

[Delivery Project Assignee].[User].getMemberByKey(CurrentUserName())

it does not work can you please help I tried all bellow option but it does not work

**CurrentUser()** - retrieves logged in eazyBI username

**CurrentUserName()** - retrieves a name of logged in eazyBI user

**CurrentUserEmail()** - retrieves email of logged in eazyBI user

error: Failed to execute query.

can you please advise me

---

<div class="post-metadata">

**Author:** ![roberts.cacus](https://community.eazybi.com/user_avatar/community.eazybi.com/roberts.cacus/32/637_2.png) [@roberts.cacus](https://community.eazybi.com/u/roberts.cacus)\
**Post date:** [October 2, 2020, 1:02pm UTC](https://community.eazybi.com/t/currentuser-failed-to-execute-query/5325/2 "2020-10-02T13:02:21Z")

</div>

Hi @ABRAR_ALMADI,

Here is my answer from our internal support discussion:

The formula won’t work as expected in an Insight data source. The Insight Object _Delivery Project Assignee_ member keys are not the same as user keys in Jira. You can verify this by placing the _Delivery Project Assignee_ dimension in rows and defining a new calculated measure with the formula below:

```
[Delivery Project Assignee].CurrentMember.Key

```

It will be an Insight Object key, more similar to an issue key.

Try to work with the names instead of keys. One way how to approach this would be defining a new calculated member in the Delivery Project Assignee dimension. Please have a look at a similar example with Server Owners below:

```
Aggregate(
 Filter(
  [Servers Server Owner].[Server Owner].Members,
  [Servers Server Owner].CurrentMember.Name MATCHES CurrentUserName()
 )
)

```

And how it would look in a report:

 ![Screen Shot 2020-09-30 at 16.46.11](https://community.eazybi.com/uploads/default/original/2X/5/59a2d001fee20e6f02b74c326b5bd50b03cbeb30.png)

Please have a look at our documentation page for more information on defining calculated members - [https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members](https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members).
