Skip to main content TDX, the developer conference for the AI agent era is happening now. Watch live on Salesforce+ for exclusive digital content, a revolutionary keynote, and more.

Hi All, 

 

Need some help with some simple number formatting. I've done a calculation between two widgets reading off the same dataset and I'm getting the right value back - however the format of the numbers isn't what I desire. It reads "362222...etc" where as i want it to just read 36.2m.

 

It won't let me access the widget anymore to change the number format via the UI, nor will it let me 'shorten the number'. 

 

Now usually i would go into the XMD file and change the format, however the dataset is a trending report and i cant seem to find an XMD file for that. 

 

So my question is how can i edit the format of the number. Here is the code for the calculation:

 

q = foreach q generate {{cell(TOTAL_PRICE_CONVERT__19.result, 0, \"sum_TOTAL_PRICE.CONVERT\").asString()}}-{{cell(TOTAL_PRICE_CONVERT__5.result, 0, \"sum_TOTAL_PRICE.CONVERT\").asString()}} as 'dif';

 

Thank you 

2 comments
0/9000