# How to get the latest result so far?

**URL:** <https://community.eazybi.com/t/how-to-get-the-latest-result-so-far/4006>\
**Category:** Questions & Answers\
**Tags:** calculatedmembers\
**Created:** [March 24, 2020, 10:08am UTC](https://community.eazybi.com/t/how-to-get-the-latest-result-so-far/4006 "2020-03-24T10:08:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinranmo](https://community.eazybi.com/letter_avatar_proxy/v4/letter/x/4491bb/32.png) [@xinranmo](https://community.eazybi.com/u/xinranmo)\
**Post date:** [March 24, 2020, 10:08am UTC](https://community.eazybi.com/t/how-to-get-the-latest-result-so-far/4006/1 "2020-03-24T10:08:30Z")

</div>

Hi,  
I am trying to get the latest score which gave system so far , just like below ‘latest score’, please help to let me how to define the caculated member with mdx, Thanks a lot

system name, Time, score，latest score  
A, Jan 2020,30,30  
A, Feb 2020, ,30  
A, Mar 2020,10,10  
B, Jan 2020,55,55  
B, Feb 2020, ,55  
B, Mar 2020, ,55  
C, Jan 2020, ,  
C, Feb 2020, 25,25  
C, Mar 2020, , 25  
D, Jan 2020, ,  
D, Feb 2020, ,  
D, Mar 2020, 20,20

Thanks a lot!  
Best Regards  
Annie Gao

---

<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:** [April 9, 2020, 1:34pm UTC](https://community.eazybi.com/t/how-to-get-the-latest-result-so-far/4006/2 "2020-04-09T13:34:02Z")

</div>

Hi @xinranmo,

I believe you have sorted out this use case already =) I just want to recap so other users could apply the solution as well.

To display the las nonempty value for all consecutive members, you can try to create a new **calculated measure** with the formula below:

```
  (
    [Measures].[Score],
    Tail(
      Filter(
        [Time].[Month].Members.item(0):
        Tail(
          Descendants([Time].CurrentMember,[Time].[Month])
        ).item(0),
      [Measures].[Score] > 0
    )).Item(0)
  )

```

It forms a tuple out of the desired measure and the current **Time** dimension member or the last one that had a value for the desired measure. The **Tail()** function is responsible for retrieving a sub-set of members from the end of the specified set. The **item(0)** method gets the first member from this sub-set. Please have a look at our documentation page for more information on the functions used in the calculated measure - [https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference](https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference).

The report with new calculated measure “Latest Score” might look like this:

 ![image](https://community.eazybi.com/uploads/default/original/2X/2/2eb4d17abfa11ea2124a5f0cf378955d9917a85e.png)

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

---

<div class="post-metadata">

**Author:** ![Rutwij\_Devashrayee](https://community.eazybi.com/user_avatar/community.eazybi.com/rutwij_devashrayee/32/7043_2.png) [@Rutwij\_Devashrayee](https://community.eazybi.com/u/Rutwij_Devashrayee)\
**Post date:** [June 13, 2022, 7:28pm UTC](https://community.eazybi.com/t/how-to-get-the-latest-result-so-far/4006/3 "2022-06-13T19:28:18Z")

</div>

Hello @zane.baranovska

I had a similar question elsewhere ([Last Record in a Time Period - #3 by Rutwij\_Devashrayee](https://community.eazybi.com/t/last-record-in-a-time-period/9529/3)) and this solution seems like it would be relevant to that question as well. When I use the above mentioned solution or something like below, I get a sum of the previous day and not the last record of the day. Any idea?

```auto
Tail(
  {[Time].[Day].CurrentDateMember.PrevMember,
  [Measures].[Coverage Percentage]},
  1
).Item(0)

```
