Loans by library, yesterday, as percentage of total loans

Contributed by Marcus Jun (Unlicensed) via Slack.

To create the last column with the loans per library as a percentage of total number of loans, you add a new column (any column because it doesn't matter; you'll be overwriting it), then Edit Formula, and enter the following in the Column Formula box:

("Loan"."Loans"/SUM("Loan"."Loans"))*100

(You may want to change the Column Properties, Data Format, Override (check) and Treat numbers as Percentage. You may also want to go to Column Format, Custom headings (check) and enter a Column Heading (or else the column heading is the formula itself)).

Because Analytics data is from 5pm yesterday, you will have circ desks that are open later than 5pm. So you might want to run the reports based on the day before yesterday (or 2 days ago).

"Loan Date"."Loan Date" = TIMESTAMPADD(SQL_TSI_DAY, -2, CURRENT_DATE)