How to filter Affects version dimension

Hi,

I would like to combine some Affects versions into one.
For example, I have the below list of affected versions-
Affects version-
DC_01_01_00_01
DC_01_01_00_02
DC_01_01_00_03
XZ_02_01_00_00
XZ_02_01_00_01

After the filtering I would like to see this as follows:
DC_01_01_00
XZ_02_01_00

Where DC_01_01_00 holds all versions that matches “DC_01_01_00” in their naming (DC_01_01_00_01, DC_01_01_00_02, DC_01_01_00_03) and XZ_02_01_00 holds all versions that matches “XZ_02_01_00” in their naming (XZ_02_01_00_00, XZ_02_01_00_01).

I couldn’t find a way to do so.

Many thanks!!

Hi Loren,

MATCHES function uses regular expressions.

For example with this function you could filter all versions that start with “DC_01_01_00” (DC_01_01_00_01, DC_01_01_00_02, DC_01_01_00_03). The “.*” from regular expressions means any number of any characters.

Aggregate(
  Filter(
    [Fix Version].[Version].Members,
    [Fix Version].CurrentHierarchyMember.Key Matches "DC_01_01_00.*"
  )
)

Hope that helps
Gvido Neilands, flex.bi

1 Like

Hi GvidoN,

Wow!! you helped me sooo much!! Thank you :smile:
I couldn’t find the right answer anywhere!

Perhaps you could assist me a bit more…
How do I expand my filter to hold:
Fix version that matches (DC_01_01_00 OR DD_01_01_00)?

Again, thank you so much!!

Regards,
Loren

Good day,

You can define this in the regular expression:

Aggregate(
  Filter(
    [Fix Version].[Version].Members,
    [Fix Version].CurrentHierarchyMember.Key Matches "D(C|D)_01_01_00.*"
  )
)

or just add another condition:

Aggregate(
  Filter(
    [Fix Version].[Version].Members,
    [Fix Version].CurrentHierarchyMember.Key Matches "DC_01_01_00.*"
    OR
    [Fix Version].CurrentHierarchyMember.Key Matches "DD_01_01_00.*"
  )
)

By the way, I do not really recommend using filter() function as it slows down report execution time. It might be a good idea to just bookmark the members and aggregate them or use other ways to find the members.

Hope that helps
Gvido Neilands, flex.bi

1 Like

Hi,

Thanks again :slight_smile: seems to work fine as you suggested.

I did notice that my report execution time is very slow. Didn’t think it’s because of the Filter function.
I’m not sure I can create so many bookmarks (more than 100) and keep growing.

Are you familiar with other ways to find members, not via Filter function?

Thanks again and have a great day,
Loren

Hi Loren,

This depends on your situation and how you organise your versions. I will message you private.

This example is using Fix Version and not Affected Version. This solution doesn’t work for Affected Version. How would you filter/aggregate for Affected Version?