As an Example, I have an Issue which can have multiple Component attributes; Say A, B, C, D etc.
I can easily create Calculated Issue Types where Issue has a specific Component e.g. ([Issue Type], [Component].[A])
What I am struggling on (I hope this is just me being a novice) is to select / group for Issue Types that have TWO (or maybe more) Components
e.g. Where there is a Component = A AND a Component = B for the Issue.
What is the method that I should be using to achieve this ? I use bookmark to filter different projects.
Aggregate(
Filter(
[Component].[Component].Members,
[Component].CurrentMember.Name = “RTS”
AND
[Component].CurrentMember.Name = “BUG_EE”
),
[Measures].[Issues history]
)
Using AND , but this method is not work…
Thank you all in advance
Nonzero(Count(
Filter(Descendants(
[Issue].CurrentMember,[Issue].[Issue]
),
([Measures].[Issues created],
[Project].[JBL AVR 1000].[RTS])>0
AND
([Measures].[Issues created],
[Project].[JBL AVR 1000].[BUG_EE])>0
))
)
I use this method and also this method is not work… ANYONE have a good solution to filter two components.
Hi @Charles
You’re almost there with the formulas!
Please try defining a new calculated measure in the Measures dimension with this formula and let me know if this returns the expected count:
Nonzero(
Count(
Filter(
Descendants([Issue].CurrentMember,[Issue].[Issue]),
([Measures].[Issues created],
[Component].[RTS])>0
AND
([Measures].[Issues created],
[Component].[BUG_EE])>0
)
)
)
Best regards,
Nauris / eazyBI support
@nauris.malitis Thank you for support. But the system mention timeout…

Hi @Charles
Apologies for the delay!
This can happen in accounts where many projects and issues are imported, as the Descendants function iterates through all the issues and the Filter function check for the necessary attributes.
There are two things you can do here:
-
Create a new report account in which you import only a smaller subset of projects and issues to do these more complex calculations and reports.
-
Define a JavaScript calculated custom field that will precalculate and find the necessary issues during the import process. You can define it in the Advanced settings (so that this custom field is available for all accounts), or, you can define it within the account by creating a new calculated field.
For example, in Advanced settings, you could use the following code to define the field:
[jira.customfield_comps]
name = "Component combinations"
data_type = "string"
dimension = true
javascript_code = '''
if(issue.fields.components && issue.fields.components.length > 0){
let components = issue.fields.components;
let hasRTS = false;
let hasBUG_EE = false;
components.forEach((component) => {
if (component.name == "RTS") {
hasRTS = true;
}
if (component.name == "BUG_EE") {
hasBUG_EE = true;
}
});
if(hasRTS && hasBUG_EE) {
issue.fields.customfield_comps = "RTS and BUG_EE"
} else {
issue.fields.customfield_comps = "other components"
}
}
'''
Save the Advacned settings, go to your Import options and select this custom field to be imported as a Dimension.
After the import finishes, you can use this “Component combinations” dimension in the Pages to filter all the issues that have both the “RTS and BUG_EE” components attached.
Let me know if this fits your use case or if you have any additional questions on this!
Best regards,
Nauris