# Calculated formula for exclude a labels with specific label prefix

**URL:** <https://community.eazybi.com/t/calculated-formula-for-exclude-a-labels-with-specific-label-prefix/4653>\
**Category:** Questions & Answers\
**Tags:** jira, calculatedmembers\
**Created:** [June 15, 2020, 7:52am UTC](https://community.eazybi.com/t/calculated-formula-for-exclude-a-labels-with-specific-label-prefix/4653 "2020-06-15T07:52:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishwas](https://community.eazybi.com/letter_avatar_proxy/v4/letter/v/779978/32.png) [@Vishwas](https://community.eazybi.com/u/Vishwas)\
**Post date:** [June 15, 2020, 7:52am UTC](https://community.eazybi.com/t/calculated-formula-for-exclude-a-labels-with-specific-label-prefix/4653/1 "2020-06-15T07:52:06Z")

</div>

Hi team,

Can you pls help me with a formula for displaying labels with excluding set of labels whose name start with “xyz-”.

Regards,  
Vishwas

---

<div class="post-metadata">

**Author:** ![gerda.grantina](https://community.eazybi.com/user_avatar/community.eazybi.com/gerda.grantina/32/1994_2.png) [@gerda.grantina](https://community.eazybi.com/u/gerda.grantina)\
**Post date:** [June 18, 2020, 8:34am UTC](https://community.eazybi.com/t/calculated-formula-for-exclude-a-labels-with-specific-label-prefix/4653/2 "2020-06-18T08:34:25Z")

</div>

Hi @Vishwas,  
welcome to eazBI community! 🙂

A label is a multi-selection field, and therefor filtering issues without some labels are tricky. As issue may have one valid label and one you would like to exclude.  
You might want to explore some similar questions and see which of the solutions could work for you:

> [@All bugs without labels](https://community.eazybi.com/t/all-bugs-without-labels/3644/3):
>
> Hi @Uris, I believe you already have sorted out this use case with eazyBI Support. A label is a multi-selection field, and therefor filtering issues without some labels are tricky. As issue may have one valid label and one you would like to exclude. Your idea to create a calculated measure that validates labels of all issues is correct. Unfortunately, this type of calculation is quite heavy and resourceful, but there are some improvements you can make. In the Label dimension, create a calc…

As well as:

> [@Exclude specific labels](https://community.eazybi.com/t/exclude-specific-labels/1273/5):
>
> Hi @prasad and @enguyen, The idea to use aggregate is correct. But in this case, to get the count of issues with specified labels you should aggregate issues instead of labels and for each issue validate assigned labels. For aggregation, you may use function [Count()](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-members/mdx-function-reference/count) and iterate through issues using function Descendants() NonZero( Count( Filter( --iterate through issues Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]), --which have label FWQA\_TestDev ([Measures].[Is…

Here is also a [JavaScript calculated customfield](https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields) example that will have faster performance:

> [@Multi values fields include and exclude values](https://community.eazybi.com/t/multi-values-fields-include-and-exclude-values/1194/2):
>
> Hi Alex, You are right, aggregation while excepting some members doesn’t work that well with multiple-value fields. One way to overcome this issue is to create a new dimension based on the existing Label dimension. Create one with the code below: [jira.customfield\_labels] name = "My Labels" data\_type = "string" dimension = true javascript\_code = ''' if (issue.fields.labels) { issue.fields.customfield\_labels = issue.fields.labels.sort().join(', ') } ''' The code will create a new dimension tha…
