Help to convert JQL

Hello,

I am trying to convert the below JQL filters into calculated field:

project = ABC AND “Technology Environment” in (Distributed,“Distributed,Mainframe”,“Mainframe,Distributed”) and status != Cancelled and “Life Cycle Status” != exit

project = TCAP AND “Technology Environment” in (Distributed,“Distributed,Mainframe”,“Mainframe,Distributed”) and status != Cancelled and “Life Cycle Status” !~ exit and “Company Initiative” in (Arena,Hilton,Jungle,Klover,Marriott,Pluto)

project = TCAP AND “Technology Environment” in (Distributed,“Distributed,Mainframe”,“Mainframe,Distributed”) and status != Cancelled and “Life Cycle Status” !~ exit and “Company Initiative” in (Arena,Hilton,Jungle,Klover,Marriott,Pluto) and “Distributed Build” in(“In Use”)

Any help would be appreciated.

Thanks
Vas

Hi Vas,

This would likely be easier if you placed these dimensions into Pages to create complex filters rather than trying to create a custom calculated member. It would also end up faster for you.

I’m assuming you would have issues on rows and some calculated measure in columns from the measures dimension.

Then you could put Project, 'Technology Environment", Status, “Life Cycle Status”, “Company Initiative”, and “Distributed Build” into Pages and then select the different combinations to get the results you’re looking for.

Does this help?

– Malik Graves-Pryor

Hi Malik,

Thanks for your response.

I tried that way but it conflicts with other calculated fields I defined so that is the reason I will have to convert these jql’s to calculated fields to match the report.

In the below report each column is a different calculated field.

Ok if that’s the case it seems that using Aggregate and Filter functions would be the best path forward to get a count

Ex:

Aggregate(
Filter([Issue].[Issue].Members,
[Project].CurrentHierarchyMember.Name = “ABC” AND ([Technology Environment].CurrentHierarchyMember.Name = “Distributed” OR [Technology Environment].CurrentHierarchyMember.Name = “Distributed,Mainframe” OR [Technology Environment].CurrentHierarchyMember.Name = “Mainframe,Distributed”) AND [Measures].[Issue status] != “Cancelled” AND [Life Cycle Status].CurrentHierarchyMember.Name != “exit”)
)

Assumptions here are that Technology Environment is a dimension as well as Life Cycle Status. If they are merely properties of an issue then you can use the get() or getProperty() function to pull out those values and aggregate them accordingly.

Hope this helps.

– Malik Graves-Pryor

2 Likes

Hi Malik,

Thanks again for your quick response.
Just fyi, I had to change not equal to symbol (!=) to <> in the query.
However, I am getting the below error:

Failed to parse query, try to make query simpler.
Or maybe saved report uses deleted calculated member.
Error message:
All arguments to function ‘{}’ must have same hierarchy.

Is there any specific property I should add this as calculated field ?

Can you paste the query that you’re using as well as list the dimensions you have created/imported to your cube?

– Malik Graves-Pryor

Hi Malik,

Here is the filter

Aggregate(
Filter([Issue].[Issue].Members,
[Project].CurrentHierarchyMember.Name = “Tool Chain Automation Program” AND
([Technology Environment].CurrentHierarchyMember.Name = “Distributed” OR
[Technology Environment].CurrentHierarchyMember.Name = “Distributed,Mainframe” OR
[Technology Environment].CurrentHierarchyMember.Name = “Mainframe,Distributed”) AND
[Measures].[Issue status] <> “Cancelled” AND
[Life Cycle Status].CurrentHierarchyMember.Name <>“exit”)
)

Try running that query without all of the pages that you have in place, and building it up one condition at a time. Whenever I’ve run into these issues I’ve always tried to focus on simplifying first and figuring out where things break before continuing forward.

– Malik Graves-Pryor

Tried all the different ways and also by simplifying the query but I still get the error.
I will let you know if I find the correct one, thanks for your help.

Vasanth

Hi,

In this case, you could try using as many dimensions in page filter as possible.

For dimensions where you expect to exclude some specific member, you could use aggregate & except functions when creating a calculated member in this specific dimension.
For example, status except Canceled

Aggregate( 
	Except( 
	[Status].[Status].Members, 
	{ 
		[Status].[Cancelled]
	}) 
)

Similar one you could create for Life Cycle Status dimension.
And please make sure that all of your fields that you use in JQL are imported as dimensions in eazyBI.

Martins / eazyBI reports

Hi @martins.vanags,

Thanks for your response.

I have different columns on the report with each different criteria so I am looking for the calculated field with filter. Do you think its possible ?

Thanks
Vas

Hi,

What I was trying to say is you could create similar calculated members in any of your dimensions - (Technology Evnironment, Status, Lifce Cycle Status or Company Initiative) and then use these dimensions as page filters (like in my previous attachment)

Your original question was how to convert JQL to eazyBI report.
Usually the result of JQL is a list of issues therefore I shared a picture of report where “Issue” dimension is in columns and measure “Isues created” is used to show issues which belong to filters in page section.

Martins / eazyBI

Hi @martins.vanags

Thanks for you response.

I am trying to generate the report with counts and not with issues so converting this jql would be helpful to generate the accurate results.

Please suggest if it is possible to fix the below query ?

Aggregate(
Filter([Issue].[Issue].Members,
[Project].CurrentHierarchyMember.Name = “Tool Chain Automation Program” AND
([Technology Environment].CurrentHierarchyMember.Name = “Distributed” OR
[Technology Environment].CurrentHierarchyMember.Name = “Distributed,Mainframe” OR
[Technology Environment].CurrentHierarchyMember.Name = “Mainframe,Distributed”) AND
[Measures].[Issue status] <> “Cancelled” AND
[Life Cycle Status].CurrentHierarchyMember.Name <>“exit”)
)

Hi,

I believe, in this case, you could create a new calculated member in “Measures” dimension using the following code example:

NonZero(
Count(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
[Issue].CurrentHierarchyMember.Parent.Name = "Tool Chain Automation Program"
AND
(
[Measures].[Issue technology Environment] = "Distributed"
OR
[Measures].[Issue technology Environment] = "Distributed,Mainframe"
OR
[Measures].[Issue technology Environment] = "Mainframe,Distributed"
)
AND
[Measures].[Issue status] <> "Cancelled"
AND
[Measures].[Issue Life Cycle Status] <> "exit"
AND
[Measures].[Issues created]>0
)
)
)

But before you use this code, please ensure that all your necessary custom fields are selected and imported via import options.
That should return the counter of issues which belong to the requirement and you can use this measure in your reports now.

If that is not the case, please reach out to eazyBI support and share some sample of the layout for your expected report.
What dimensions would you use in rows/columns and page filters for your final report?

Perfect, this worked :slight_smile:

One last question, does Time dimension work on this report? When I try to add Time on pages its not generating correct results.

Thanks
Vas

Hi,

If you use “Time” dimension then results would be calculated based on issues that were created in the selected timeframe because it is tied to “Issues created” > 0 (see the code above).

You could change that measure in code to “isssues resolved” > 0 then report would show results based on issues which were resolved in selected timeframe.

Martins / eazyBI support