-
Vicki - right now we don't have the ability to format a formula in an answer using the format specification, only in a worksheet. However, if this formula is not going to be aggregated, then you can try 'concat(<formula>, "%")'. Note that this converts it to a string, so you can't aggregate these values. It's also possible that the values can combine if the rows aren't otherwise unique, because this essentially becomes a string attribute.
There is an open feature request to support answer level formatting, but it's not currently in the works. Hope this helps.Reply -
If anyone does find they need to take this route, it is slightly more involved as a concat won't do an implicit transform to text (it won't let you select a number as an input). You need to take a couple of steps:
1. Round to two decimal places using the round function:
round((sum (transaction) / group_sum (transaction ) ) *100, 0.01)
2. Convert this to a string:
to_string(round((sum (transaction) / group_sum (transaction ) ) *100, 0.01))
3. Stick the percent sign on the end:
concat(to_string(round((sum (transaction) / group_sum (transaction ) ) *100, 0.01)),' %')
Aggregating percentages never works out happily so the side effect of removing totals isn't too bad, as long as you bear in mind Bill's comment that this becomes another attribute (a dynamically generated one, but an attribute all the same).
Reply -
Stuart Herd this still doesn't allow the user to set the precision/scale of the decimal. This (string) solution would work if there were a LEFT() or RIGHT() function... but there isn't from what I can tell.
Bill Back how do we see/review the list of Feature Requests? I can't seem to find it anywhere. Also, this feature could be solved with DECIMAL(x,y) or FORMAT() functions, similar to SQL... there is a TO_DOUBLE function, but it doesn't allow the user to set the precision/scale.
Thanks for the response guys!
Sam K.
Tyson FoodsReply -
Sam Kazery Have you been able to try the suggestion from Stuart Herd? I believe you can control the precision/scale of the decimal with his approach by modifying the 0.01 to either 0.1/0.01/0.001/etc. The other caveats mentioned in the replies still apply. We will be at Tyson Corp HQ tomorrow for additional training sessions, so please feel free to stop by if you would like to discuss further. Thanks!
Reply -
Jason George - Good to hear from you again!
We actually met at Tyson today... and I'll be there tomorrow too. I was the person who identified the undocumented use of "M" to auto-populate millions into the number format when adding a conditional format. :)
Yes, I tried Stuart's suggestion before I replied above; but unfortunately it does not drop the trailing zero(s). For example, when I round the value to 0.1, then a field that is formatted as ##0.00 with a value of 543.21 would simply round to 543.20... but there would still be 2 significant digits.
I have successfully used the "to_integer" function to drop ALL decimal places, but that still leaves the user unable to modify the format to the desired scale.
This obviously isn't a big deal, but it would add much more flexibility to users who exporting charts/tables while also preventing the maintenance of multiple fields/Worksheets just to provide various number formats.
Maybe we'll see this functionality in a future release soon. Thanks for all your help today... I'm really liking what I am seeing of ThoughtSpot so far - great tool!
Reply -
I faced this issue too, and found that there is no way out to keep the same decimal places throughout. Even after removing the decimal places by changing the values to integer, when i convert them into graph mode, they switch back to have decimal places. It would be good to have this feature .
Reply