Grouping labels which don't match string into a "Other" group

Hi there,

I have a data set with issues contain multiple labels. In the Label dimension, I’m filtering out labels containing a specific string:

Aggregate({
Filter([Label].[Label].Members,
[Label].CurrentHierarchyMember.Name MATCHES “.test.”)
})

Then I visualize the results in a pie chat. This bit works well.

However, I’d like in the same pie chart to also add issues which don’t have any label containing “test” and lump them into a single same-color pie slice, with everything maintaining their respective size.
image

(issues containing both other labels and labels containing “test” can remain in their respective test slice, just trying to group all cases where none of the labels contain “test”)

Thanks in advance!

Hi @Vlad_Neykov

You can click on the name of the measure and select “Top rows” → “N rows” → “5” to show only the Top 5 values in your report.
When enabling this, a new button “All others” will show up. Select it to show all other labels summed together in one slice of the pie.

Let me know if this fits your use case!
Best regards,
Nauris / eazyBI support

Hi Nauris,

Thanks for your reply. I don’t want to arbitrary group the largest/smallest, I am specifically looking at grouping all labels not containing a specific prefix into a single slice.

I’ve updated the image from above to showcase this more clearly: I’d like all labels (marked in red here for visibility) which do not contain the word “test” to be grouped in the same slice.
image

Thanks in advance!
Vlad

Hi Vlad,

Thanks for the elaboration and sorry for the misunderstanding!

If you have defined a custom member “Test labels” in the Label dimension with the formula you previously mentioned:

Aggregate({
  Filter([Label].[Label].Members,
  [Label].CurrentHierarchyMember.Name MATCHES '.*test.*')
})

You can then define a new calculated member “Other labels” in the Label dimension with a simple subtraction:

[Label].DefaultMember
-
[Label].[Test labels]

Doing it this way ensures that issues with multiple labels containing a “test” label would not be counted towards the “Other labels” slice.

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

Hi Nauris,
Thanks, much appreciated: this solved it for me! :slight_smile:

Have a great weekend!
Vlad