on 12-30-2014 5:30 PM
Hello!
Trying to convert a sum value to appear as text.
Here is my formula:
if Sum ({@Thurs Daily Count})=0 then 0 else
Sum ({@Thurs Daily Count},{PTS_1_18_13_10_09.Scheduler}) / Sum ({@Thurs Daily Count})*100
I want to have this appear as "NA" instead of appearing as 0. I believe I'll need to convert the number 0 to text "NA".....? Thanks!
Rich
Hi Rich,
Change the code to:
if Sum ({@Thurs Daily Count}) = 0 then "N/A" else
totext(Sum ({@Thurs Daily Count},{PTS_1_18_13_10_09.Scheduler}) / Sum ({@Thurs Daily Count})*100)
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try something like this:
if Sum ({@Thurs Daily Count})=0 then 'NA' else
ToText(Sum ({@Thurs Daily Count},{PTS_1_18_13_10_09.Scheduler}) % Sum ({@Thurs Daily Count}))
The '%' operator will automatically set the number as a percent so you don't have to explicitly use "*100" in your formula.
Note that both values in the If statement must be of the same data type. If you want to tweak the format of output from the "else", look in the Crystal help for the ToText() function - there are a number of formatting options.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.