Want to look up the release date attached to the affects version dimension with the value from a custom measure

Hello I’m new to MDX and EazyBI but have a problem that I have been unable to move past after reading about several functions/similar problems.

I’m trying to figure out how can use a replacement of affects version to get the stored release date.

I need the lowest affects versions release date to determine if the issue escaped or not.

The problem, my project can have multiple affects versions return on a single issue i.e. Affects version (1.00, 1.10) etc.

I got the lowest affects version by using:

cast(
    ExtractString([Measures].[Issue affects versions],"^.{5}") as NUMERIC
    )

The problem is I need to use the above retrieved value on the dimension:

The release date is stored like this:

[Affects Version].CurrentMember.get('Release date')

So I just want in essence to do something like this:

[Affects Version] = cast(ExtractString([Measures].[Issue affects versions],"^.{5}") as NUMERIC).CurrentMember.get('Release date')

Hi @Davo

Welcome to the Community! :tada:

If you search in the Measures dimension for the property “Issue affects versions” and click the “show” button, you’ll see a formula that is really close to fitting your use case:

[Affects Version].[Version].getMemberNamesByKeys(
  [Issue].CurrentHierarchyMember.get('Affects version IDs')
)

You can adjust it a bit so that instead of getMemberNamesByKeys, you would use getMembersByKeys, and from these members, you can select the first item or .Item(0) (index 0 means the first in the list), then you can ask this first member for the Release date:

[Affects Version].[Version].getMembersByKeys(
  [Issue].CurrentHierarchyMember.get('Affects version IDs')
).Item(0).GetDate('Release date')

Let me know if this works as expected!
​Best regards,
​Nauris

This worked perfectly thank you!

1 Like