# How to code Report to filter out specific labels

**URL:** <https://community.eazybi.com/t/how-to-code-report-to-filter-out-specific-labels/17547>\
**Category:** Questions & Answers\
**Created:** [June 23, 2024, 3:32pm UTC](https://community.eazybi.com/t/how-to-code-report-to-filter-out-specific-labels/17547 "2024-06-23T15:32:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kovanp](https://community.eazybi.com/letter_avatar_proxy/v4/letter/k/e9bcb4/32.png) [@kovanp](https://community.eazybi.com/u/kovanp)\
**Post date:** [June 23, 2024, 3:32pm UTC](https://community.eazybi.com/t/how-to-code-report-to-filter-out-specific-labels/17547/1 "2024-06-23T15:32:48Z")

</div>

what are the specific step by step instructions to code calculated member formula to OMIT issues from a report with a specific label or labels.  
i haven tried column filtering (did not work) i have tried - Define Calculated Member formula\*\* - copied the filter formula from documentation but that did not work.  
used this  
Filter(  
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),  
[Measures].[Issue labels] NOT MATCHES ‘._bypasstest._’  
)  
got this error  
 ![eazybi](https://community.eazybi.com/uploads/default/original/2X/3/33faad69196e85284e480af357ff5da9fca38d82.png)  
Formula is not valid:  
Member expression ‘Filter(Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]), (NOT ([Measures].[Issue labels] MATCHES “._bypasstest._”)))’ must not be a set

---

<div class="post-metadata">

**Author:** ![ilze.leite](https://community.eazybi.com/user_avatar/community.eazybi.com/ilze.leite/32/19_2.png) [@ilze.leite](https://community.eazybi.com/u/ilze.leite)\
**Post date:** [July 2, 2024, 1:51pm UTC](https://community.eazybi.com/t/how-to-code-report-to-filter-out-specific-labels/17547/2 "2024-07-02T13:51:25Z")

</div>

Hi @kovanp

Yes, dealing with labels is tricky, as “Labels” is a multivalue field.

You are on the right track with iterating through issues and applying the filter condition; only an **aggregate** is missing over the set, and you need to create a **calculated measure** instead of a member in the Issue dimension.  
So, you need to define whether you want to get the sum or average values (or Min, Max, Median, etc.) and with what measure (issue count, resolved issues count, logged hours from those issues, etc.). Read in the documentation how to create a measure with Sum(): [Sum](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/sum) , and one more example with Descendants() function used in Sum calculation: [Descendants](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/descendants)

In your case, for example, the count of all issues not matching the mentioned label would be the following:

```auto
Sum(
-- set expression
 Filter(
    Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
--filter issues by by label name
     [Measures].[Issue labels] NOT MATCHES ".*bypasstest.*"
  ),
-- apply numeric expression on the issues from the filtered set
[Measures].[Issues created]
)

```

You may check other approaches how to excluding labels: [Calculated member excluding some labels - #2 by zane.baranovska](https://community.eazybi.com/t/calculated-member-excluding-some-labels/6453/2)

Best,  
IlzeLA, [support@eazybi.com](mailto:support@eazybi.com)
