ASCII
ASCII stay for American Standard Code for Information Interchange. ASCII is a character encoding to display text on computers and electronic devices. All ASCII codes you can find here.ASCII function returns the ASCII value of the leftmost character of a given string. Usually these functions are using when you work with HTML. Unfortunately I do not work with HTML and I cannot say more about the way of using of this function.
Anyway let us take a look at the example in tableau and let's understand what happened by using of this function.
I dropped "Category" from the example of Superstore to the row and created a calculation field
If we take a look at the table: ASCII - Code, we can see that for the upper "F" we have value 70, for "O" - 79 and for "T" - 84. So why do we have 148,470 for the "Furniture"; 476,054 for the "Office Supplies" and 155,148 for the "Technology"?
Because tableau aggregates all "F" in the whole table "Superstore". There are 2,121 rows, which begin with "F", so tableau gives as the sum of them: 2,121*70=148,470. We have also 6,028 with "O" (79*6028 = 476,054) and 1,847 rows with "T" (1,847*84 = 155,148)
In order to get ASCII - Code as a not aggregated result, we have to use function MIN() or MAX() or AVG()
CHAR
You can also
convert the ASCII Code into Spells, by using the CHAR function. Look at this
example:
I have a data
set with this numbers
Code
|
68
|
105
|
108
|
121
|
97
|
110
|
97
|
With the
function “CHAR” I could convert this numbers into spells.
I would appreciate, if you could give me some examples in which cases do you use this function.Take care! 😉
Kommentare
Kommentar veröffentlichen