Toad World® Forums

Percent Button in Pivot Grid's Custom Calculation Window

What is the intended use of the button with the percent sign that is in the Pivot Grid's "Edit Expression" or "Add Calculated Field" window? My first guess was that it would multiply by 100 and add a percent sign...but all of my attempts result in an error.

The "Percent" operator calculates the integer remainder of a division. This is a "modulo" operator in arithmetic.

In "integer division",
11 / 4 = 2 (with remainder of 3)
11 % 4 = 3 (yields the remainder after division.)

1023 % 2 = 1
1024 % 2 = 0
1025 %2 = 1, etc.

e.g. Performing "% 2" on any integer is a great way to tell if it's odd or even.
Hope this helps.

Nice. Thanks, Gary!