Simple Subtraction
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi!
I have a field Field 2 that I want to modify the design of the result by using the Formula Tool. Please see below:
[Field 1] | [Field 2] | [Desired Field 2 Result] |
1000 | 800 | 800 (80%) |
So really, a subtraction of the two, but modify the result in Field 2 so that it is the result and the subtraction in brackets. Dont really want to have a new field, but just keep the two fields and change the way the result looks.
Any ideas?
Thanks!
Solved! Go to Solution.
- Labels:
- Developer
- Expression
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hey @ZoeM
would this work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So is it the tostring portion that wont allow to stay within the same field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ZoeM if you check the datatype of the field you are currently working on, you will notice it's a numeric:
That means you can't turn it into a String column which you are effectively wanting to do. However, you could use my approach above what does that all in one go, or you could break it into steps:
1) Change datatype of the column to string:
2) drag a formula tool on. This would allow you to get that custom look you're wanting:
3) then add the customised part:
In essence you can do this with two tools like I've shown here, or you can use one like I did above. Whatever works best for you.
All the best,
BS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ZoeM yes you need the tostring() in order to have the % symbol in your field since you are combining numeric and non numeric fields into an overall sting frield.