Pivot Table with Calculated Columns?

I have a query with Calculated Columns, but I'm unable to Pivot/Subtotal the results:

Here's the same query without the Calculated Columns:

What would cause the Pivot Table visualization to be deactivated?

The reason is that Pivot tables can only be used with aggregated queries. In fact if you click the Pivot table you will probably get that error message

Your custom column at the end seems to be making a new unaggregated query

Is there a way to fix that?

Build the calculated columns in the beginning of the query if that’s possible, or do an aggregation after the custom columns

Sorry - still new to using Metabase, so I'm not sure how to do either of those.
Any tutorials/docs you could point me to for help?

You added custom columns and aggregations in your query already

Correct, but you mention building them at the beginning of the query or do an aggregation after the custom columns, so I'm a bit confused on that suggestion.

Do you mean rearrange the columns in the Summarize area?

I just noticed that I wasn't including my custom columns in the Summarized area, so I went ahead and added them thinking that was the issue, but the Pivot option still wasn't available.

On the top under the table you can make custom columns

Sorry for the late reply... I think I follow now.
I'll see if doing that gives me the results I need.