By Craig Colangelo, Sr Consultant for PerformanceG2
Requirement was to display crosstab intersection as a ratio in HTML output, but retain conventional decimal format for the data item itself (for further downstream computation and at a different scale). Consequent for the ratio was to always be 1. Could not add additional data items.
There are several possible solutions to this problem. Couldn’t use any form of casting to string, as I needed decimal downstream…and at finer scale than display. Also couldn’t add a one off version just for display. Decided to use the solution described below as it met my needs well for this particular problem. Decided to share it because the Pattern property is not very well documented and took trial and error to get right syntax.
In the Crosstab Intersection’s properties -> Data -> Data Format -> Number (2 decimal places) -> Pattern property….set to ###.##’:1′. This will take 3.544432112 and display it as 3.54:1, while retaining the integrity of the decimal itself…so that it can be used downstream at more precise scale for other calculations.