cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Project level computed expression for summing up document level field

BaluS
10-Marble

Project level computed expression for summing up document level field

At the Project level, I need to follow the "Documented By" relationship field, and calculate the "Last Week Document Churn" from Requirement Specification Documents and Test Protocol Documents, separately.

 

Below expression gives total for all documents in the "Documented By" relationship field.

<%compute%>aggregateByTree("Documented By",sum("Last Week Document Churn"))<%endcompute%>

Is there a way to add a type constraint (e.g. Type == "Requirement Specification Document"). I tried, but they all give syntax errors.

 

Can someone please help me?

 

Thank you,

Balu

ACCEPTED SOLUTION

Accepted Solutions
BaluS
10-Marble
(To:BaluS)

Came up with below computed expressions for computing Last Week Document Churn, separately for Requirement Spec Docs and Test Protocol Docs, following the "Documented By" relationship field in a Project item:

 

<%compute%>aggregateByTree("Documented By", sum(isType("Requirement Specification Document") ? "Last Week Document Churn" : 0))<%endcompute%>
<%compute%>aggregateByTree("Documented By", sum(isType("Test Protocol Document") ? "Last Week Document Churn" : 0))<%endcompute%>

 

View solution in original post

2 REPLIES 2
BaluS
10-Marble
(To:BaluS)

I took a different approach for the computed fields, and was able to solve this. Create a regular query for your document type (e.g. "All Requirement Specification Documents"), then use it in a compute Query function in the report with "Project" as a correlation field and sum for the aggregate expression.

 

<%compute%>Query("All Requirement Specification Documents", Project, sum("Last Week Document Churn"))<%endcompute%>

<%compute%>Query("All Test Protocol Documents", Project, sum("Last Week Document Churn"))<%endcompute%>

BaluS
10-Marble
(To:BaluS)

Came up with below computed expressions for computing Last Week Document Churn, separately for Requirement Spec Docs and Test Protocol Docs, following the "Documented By" relationship field in a Project item:

 

<%compute%>aggregateByTree("Documented By", sum(isType("Requirement Specification Document") ? "Last Week Document Churn" : 0))<%endcompute%>
<%compute%>aggregateByTree("Documented By", sum(isType("Test Protocol Document") ? "Last Week Document Churn" : 0))<%endcompute%>

 

Announcements


Top Tags