Loading

How To Display Numbers in Japanese Yen Price Format With Using "億", "万" and "円"

Дата публикации: Apr 13, 2024
Задача

If I set a custom format for a number dimension as ####億####万####円 to display as Japanese Yen prices according to the Excel style number code, unnecessary "億" is added to the top of numbers if the number is less than 100,000,000 yen (1億円). How can I set correct Japanese Yen price format with using "億", "万" and "円"?

Действия
Create a calculated field including the following formula. In this formula, Price field is converted to string first, then "億", "万" or "円" is inserted into the sting values based on the  number of digits.
IF LEN(STR([Price]))=9 THEN LEFT(STR([Price]),1)+"億"+MID(STR([Price]),2,4)+"万"+RIGHT(STR([Price]),4)+"円"
ELSEIF LEN(STR([Price]))=8 THEN LEFT(STR([Price]),4)+"万"+RIGHT(STR([Price]),4)+"円" 
ELSEIF LEN(STR([Price]))=7 THEN LEFT(STR([Price]),3)+"万"+RIGHT(STR([Price]),4)+"円" END
 
Номер статьи базы знаний

001456799

Вложения

JapaneseYenFormat.twbx

9 KB

 
Загрузка
Salesforce Help | Article