Expand my Community achievements bar.

SOLVED

Calculated Field / Column Question

Avatar

Level 2

Hi.  I have 4 custom fields that have large single-select dropdown fields; all the columns have the same values.  The fields are added as individual columns in a report where the user can select value in each column for each project.  My report columns have this layout > Project, Menu 1, Menu 2, Menu 3, Menu 4

Project NameMenu 1Menu 2Menu 3Menu 4
Test 1A1B2C1A2
Test 2B2A1B1A2
Test 3A1C1B2B1

 

I have created a calculated field that will show the number of instances each that value occurs per project & built another report.

Project NameA1 Value CountA2 Value Count B1 Value Count B2 Value Count C1 Value Count
Test 111011
Test 201110
Test 310111

 

My question - Is there a way to create a calculated column to add the totals of each Value Count column?  The goal is to have the total from each column reported on a graph (i.e. a pie chart showing there are 2 results for A1 Value Count, 2 for A2 Value Count, 2 for B1 Value Count, 3 for B2 Value Count, 2 for C1 Value Count.  I have tried different ways in text mode but haven't been able to work it out.  Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @gurltech - The way to get a total for the columns would be to use an aggregated grouping. To do so, turn on the grouping and then for each column turn on the count option in the "Summarize this column by:" field. It should then do the totals in the grouping on the report. 

 

Unfortunately, this won't work for charts and only works for lists.

 

VictoriaLinn_0-1737467161668.png

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @gurltech - The way to get a total for the columns would be to use an aggregated grouping. To do so, turn on the grouping and then for each column turn on the count option in the "Summarize this column by:" field. It should then do the totals in the grouping on the report. 

 

Unfortunately, this won't work for charts and only works for lists.

 

VictoriaLinn_0-1737467161668.png

Avatar

Community Advisor

lol, I was typing out the same answer as you at the same time. Great Minds!

Avatar

Community Advisor

Could you Group the report by Project, collapse the grouping, and then summarise each "count" column by sum? 

This would display the sum of each column at the top of the group.

TIP: if this solves your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use.
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/mysocalledideas

 

Avatar

Community Advisor

Focusing on your charts question: I don't think you will be able to get all 6 counts into one pie or bar chart. The closest you'll get within workfront is 6 charts on one dashboard (one for each type of menu item). Hopefully it makes sense if I give you the analogy of making a pie chart out of project statuses. A project only has one status field, so when you make a pie chart, you're reporting a bunch of different statuses in your pie, but it is coming from one field. This thing you are trying to do is coming from 6 fields. There's no way to combine it into one field because you have 6 answers. Normally I would be trying to locate an answer using a matrix report, but if you want a visual chart I think this is just out of the question.

 

If you make them horizontal bars, this will probably produce the best result. 

Avatar

Level 1

Yes! You can create a calculated column that sums up the total occurrences of each value across all projects. Here's how you can approach it:

Solution: Adding a Total Count Column

You need to sum up each Value Count column across all rows to get a total count of each unique value.

Steps to Achieve This in a Report:

  1. Create a Summary Report:

    • Group the report by none (so you get a total count across all projects).
    • Use aggregations (SUM function) for each Value Count column.
  2. Use a Calculated Column (if available in your system):

    • If your reporting tool supports formulas, create a calculated column like:
      mathematica
      CopyEdit
      Total A1 Count = SUM(A1 Value Count) Total A2 Count = SUM(A2 Value Count) Total B1 Count = SUM(B1 Value Count) Total B2 Count = SUM(B2 Value Count) Total C1 Count = SUM(C1 Value Count)
    • This will aggregate all occurrences of each value across projects.
  3. Generate a Pie Chart:

    • Once you have the total counts, plot them in a pie chart.
    • Each slice of the pie will represent how many times each value appears across all projects.

Expected Totals for Your Example Data:

Value Total Count

A12
A22
B12
B23
C12

If you’re using Text Mode Reporting, you may need to manually specify the column aggregation as a SUM function.

Would you like help writing a specific formula based on the platform you’re using (e.g., Workfront, Excel, Power BI)?