Calculation within same field

Hello, newbie here. I am trying to create a calculated field by dividing the rest of the letters to “A”. How do I do that in a calculated field?

The result I wanted to get would be a cost per letter A.

	Letter	Cost
	A	         5
	B	         2
	C	         3
	D	        4
	E	        5
	F	        6
Result I am looking for:
         B/A 0.4
	C/A	0.60
	D/A	0.80
	E/A	1.00
	F/A	1.20

You can do this:

firstValue(sum({cost}),[{Letter} ASC],[{Letter}])/firstValue(sum({cost}),[{Letter} ASC],[NULL])

This will take the current row for letter then divide it by the first letter.

In this case, it will still show a row that will resemble A/A, right? How do I hide that? When i use filter and remove A, it erases all the rest.

Yes it will show it because you need that value to calculated the others. If you filter out A/A then you filter out A.