Understand that you’ve probably worked this out, and also agree that the learning-through-tinkering is part of the satisfaction / mystery / self-education. A few extra points:
You probably know this already, but the way to format string data as currency is with the .format("$") operator. It’s described in (of course) aTbRef here. It uses whatever is your computer’s locally set currency.
Thus if you’re starting with number data, and want to get a currency display, you first transfer the numeric info to a string attribute, and then you format that string attribute. For instance, if the underlying numeric info were stored in an attribute called $NumericInfo, you could create a new string attribute called $CurrencyDisplay and apply a rule like: $CurrencyDisplay=$NumericInfo.format("$")
You can format number -type data and attributes to various degrees of precision, as explained [here]
The screenshot below illustrates how I’ve used formatting and summaries in the attribute browser. This falls short of elegance in one minor way but does the job. Here’s the image, followed by an explanation:
This is for a financial-data file. In the attribute browser, I want to see items grouped by category – with a summary by category. This one shows a currency-formatted entry for each item, and then a total, listed as “Sum,” for the category as a whole.
The minor inelegance, which I’m sure one of our gurus can straighten out: To the best of my knowledge, the currency format – .format("$") – works only on string data, so I have a separate column called $FormattedSum which is the numeric entries converted to a string and then nicely formatted. But to have a category-total figure – the “Sum” in the upper right-hand corner – I need to work from actual number data, thus the inclusion of the $Sum column, which is a number-type attribute. I believe that I can’t have the summary figure without showing the column itself.
In any case this is a half-of-one-percent inelegance, for a display that shows me just what I want. I use this for all kinds of accounting purposes, and I get: individual entries, respective dates, individual amounts nicely formatted, and then the sum for the category as a whole. Offered for your further tinkering.