7 Replies Latest reply on Dec 6, 2017 9:18 PM by David Woodley

# Counting values over years from Sign Calculation

Hi all

I have found a few similar discussion related to sorting Grand Totals, but not exactly what I am looking for.

I have set of donors, some who give many times a year over many years.  I only need to count such gifts in any year as a "positive value". I used a sign calculation form this and applied the "gift date" to columns.  However, the Grand Total column, which counts each "positive" year of giving is not sortable.  I can see the sort button.  Clicking does nothing.  If I switch the "total using" from Sum to Automatic, it changes the grand total value to one.

Any thoughts on how I can make the Grand Total sort descending?

• ###### 1. Re: Counting values over years from Sign Calculation

What is your Calculation for this:

Can you post that here, Your Aggregated value is not allowing that.

• ###### 2. Re: Counting values over years from Sign Calculation

Are you saying you want to sort that chart by AGG(Sign) ?

If so, add a second pill for AGG(sign) onto COLUMNS.  Then convert it from Continuous (which is indicated by the pill being green) to DISCRETE.  then drag that blue pill in front of the YEAR pill.  Tableau will now sort the sheet by that pill first -- ascending.

If you want descending, create a second calc:

[Sign] * -1

This will make every [Sign] value negative, and do the same exercise with that calc instead of with the [Sign] calc.  The negative values will make the chart sort descending.  Once you like the sort, uncheck 'Show header' for that extra pill and nobody will see the sorting values on the chart.

• ###### 3. Re: Counting values over years from Sign Calculation

The Sign Calculation is "SIGN([Count Gifts])". (Count Gifts) is also a calculated field "COUNTD([giftRecID])".   giftRecID is an individual gift.  Each ConstituentID can have multiple Gift Record IDs.  But whether it's 1 or 100 it just needs to show as 1 for each fiscal year.

• ###### 4. Re: Counting values over years from Sign Calculation

Just Follow Joe's Solution

• ###### 5. Re: Counting values over years from Sign Calculation

"If so, add a second pill for AGG(sign) onto COLUMNS.  Then convert it from Continuous (which is indicated by the pill being green) to DISCRETE.  then drag that blue pill in front of the YEAR pill.  Tableau will now sort the sheet by that pill first -- ascending. "

This does not result in a sort.  Clicking sort in either Pill or quick button does not sort.  Am I missing something?

• ###### 6. Re: Counting values over years from Sign Calculation

Post a sample workbook.  I'll show you what I was trying to describe.

• ###### 7. Re: Counting values over years from Sign Calculation

Here is a sample.  Thank you for looking!