Jump to content
  • 0

Get the Sum of Yes Response in Tabular Report DataPage


CaptNemo

Question

3 answers to this question

Recommended Posts

  • 0

@CaptNemo


You can do the following to have an aggregation for yes no field.

1) Insert a Calculated Field and use the following code. Repeat these steps for Tuesday, Wednesday, and Thursday:

CASE WHEN [@field:YourYesNofield]=1 THEN 1 ELSE 0 END

2) Insert a Total & Aggregated Field and apply the Sum Function. Then, include the calculated fields you created in the Selected Fields section.

Hope this helps!

Link to comment
Share on other sites

  • 0

@CaptNemo

If you are trying to display it in one row you can refer to this post
 

Sample Code:

HEADER
 
<style>
tr[data-cb-aggregation="Aggregate2"], 
tr[data-cb-aggregation="Aggregate3"],
tr[data-cb-aggregation="Aggregate4"] {
display: none;
}
td.cbResultSetTotalsData{
font-weight: bold !important;
}
</style>
 
 
FOOTER
<script>
document.addEventListener('DataPageReady', moveTotalsToOneRow)
function moveTotalsToOneRow() {
const totalsSecond = document.querySelector('tr[data-cb-aggregation="Aggregate2"] td:nth-child(2)').innerHTML; 
const totalsThird= document.querySelector('tr[data-cb-aggregation="Aggregate3"] td:nth-child(2)').innerHTML;
const totalsForth= document.querySelector('tr[data-cb-aggregation="Aggregate4"] td:nth-child(2)').innerHTML;
document.querySelector('tr[data-cb-aggregation="Aggregate1"] td:nth-child(3)').innerHTML = totalsSecond;
document.querySelector('tr[data-cb-aggregation="Aggregate1"] td:nth-child(4)').innerHTML = totalsThird;
document.querySelector('tr[data-cb-aggregation="Aggregate1"] td:nth-child(5)').innerHTML = totalsForth;
document.removeEventListener('DataPageReady', moveTotalsToOneRow);
}
</script>


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...