Filtering results using a calculated formula

I want to get issues resolved and issues created but without issues that are tagged with specific labels. The Issues created count works and this is how I did the calculation.

I created [Measures].[Issues created without label 1 2 3]

NonZero([Measures].[Issues created count] 
- [Measures].[1] 
- [Measures].[2] 
- [Measures].[3])

I defined [Measures].[1] as

NonZero([label].[1])

This shows me all created issues without labels 1, 2 and 3. But when I do the same for Issues Resolved Count using the same formula. It does not remove the results with labels 1, 2 or 3

NonZero([Measures].[Issues resolved count] 
- [Measures].[1] 
- [Measures].[2] 
- [Measures].[3])

Is there something different, why it does not remove the results when I use Issues Resolved?

Hi @MPG,

The problem could stem from the way how you defined the calculated measures “1”, “2”, and “3”. They contain only a Label dimension member. In such a case, eazyBI most likely falls back to the default measure “Issues created”, and that seems to work for the “Issues created without label 1 2 3” calculation.

For “Issues resolved without label 1 2 3”, still the “Issues created” with the particular label are subtracted. You would need to define which measure to consider in your calculations, for example, “1 resolved”:

([Measures].[Issues resolved count],
[Label].[1])

Still, a problem is unsolved - “Labels” is a multi-value field. One issue could have all three labels. With your calculations, that single issue would be removed 3 times, subtracting from the total two more items, skewing the total results.

One way to addressing this is to create a calculate measure that iterates through issues and considers each issue labels. See an example here - Exclude specific labels - #5 by zane.baranovska.

You can see another example here of finding issues with particular labels - Get issues that have two labels (both labels) - #2 by martins.vanags. You would have to negate the label conditions with NOT in front of them.

Please see some ground rules regarding calculated measure definition - Calculated measures and members.

Best,
Roberts // support@eazybi.com

1 Like