**D****escription:**

Calculates the appropriate suffix for display of ordinal numbers (e.g. 1**st**, 2**nd**, 3**rd**, ...).

This can improve readability when numbers are embedded in text such as headings, tooltips and annotations.

**Example Calculation:**

```
IF (RIGHT(STR([N]),1)="1") THEN
IF (RIGHT(STR([N]),2)="11") THEN "th" ELSE "st" END
ELSEIF (RIGHT(STR([N]),1)="2") THEN
IF (RIGHT(STR([N]),2)="12") THEN "th" ELSE "nd" END
ELSEIF (RIGHT(STR([N]),1)="3") THEN
IF (RIGHT(STR([N]),2)="13") THEN "th" ELSE "rd" END
ELSE
"th"
END
```

[N] - An integer field.

**Comments:**

This calculation is based on a version contributed by Ty Alevizos in response to

in the original Tableau Calculation Reference Library.
## Comments