Let's Get Social!
Focal Point    Focal Point Forums    WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Millions of Dollars in InfoAssist?
 Go New Search Notify Tools Reply
 [SOLVED] Millions of Dollars in InfoAssist?
Expert
 posted December 14, 2018 02:08 PM
Is there an easy, out of the box, conversion to convert big decimals to Millions of Dollars in InfoAssist ('12,345,678.99' to '\$12.345M'?

This image is from tableau. So I'm thinking: If tableau has it as an automatic conversion, then WebFOCUS should have something simple, if not automagic, to do this. Yeah, I know it's easy for chart creation. But, We need this for report creation in IA.

I know we can do the following. But, that's too complex for the average business users who is new to WebFOCUS.
`MyBigNumber/A12='\$' || (EDIT(EDIT(ThisBigNumber),'\$\$\$\$\$\$\$99.999')) || 'M';`
Or several other methods.

This message has been edited. Last edited by: Doug,

 In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.   Most recent: 8204 Gen 48 in Test and Production.   Currently Available. Please contact me.

 Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005 IP
Virtuoso
 posted December 14, 2018 08:17 PM Hide Post
I doubt this is an available mask. When I’ve had to do this, I just divided by 1,000,000 and put the word Millions in the column title.

WebFOCUS 8206, Unix, Windows

 Posts: 1659 | Location: New York City | Registered: December 30, 2015 IP
Guru
 posted December 17, 2018 07:59 AM Hide Post
What about a COMPUTE D12.2Mm? This will change it as you can type in the "Mm".

WebFOCUS 8.1.05

 Posts: 495 | Registered: January 04, 2008 IP
Virtuoso
 posted December 17, 2018 08:43 AM Hide Post
MattC: Thanks so much! I just learned something totally new here. I never knew about this mask. And if you just type D12.2m inside the format box in InfoAssist, you get the number in millions. Outstanding!

WebFOCUS 8206, Unix, Windows

 Posts: 1659 | Location: New York City | Registered: December 30, 2015 IP
Expert
 posted December 18, 2018 10:21 AM Hide Post
👍 Yeppers, D12.2Mm does the trick in either a COMPUTE or DEFINE...

This message has been edited. Last edited by: Doug,

 Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005 IP
Virtuoso
 posted December 18, 2018 11:01 AM Hide Post
As an FYI, D12.2Mk will give you the value in 1,000's (e.g. \$45K). You can also use b for Billions and t for Trillions if you need those numbers.

WebFOCUS 8206, Unix, Windows

 Posts: 1659 | Location: New York City | Registered: December 30, 2015 IP
Master
 posted December 18, 2018 03:08 PM Hide Post
```DEFINE FILE CAR
MYDCOST/D12.2Mm = DCOST;
END
TABLE FILE CAR
PRINT DCOST
MYDCOST
END  ```

Gives a 'FOC253 Invalid format spec D12.2Mm'.

I don't see formats like 'm', 't', or 'b', in the 81 'Describing Data with the WebFOCUS Language' manual.

Are you folks describing new formats available in 82 WebFOCUS?

 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 Posts: 762 | Registered: April 23, 2003 IP
Virtuoso
 posted December 18, 2018 03:17 PM Hide Post
I believe these features were added in 8204.

WebFOCUS 8206, Unix, Windows

 Posts: 1659 | Location: New York City | Registered: December 30, 2015 IP
Expert
 posted January 07, 2019 04:33 PM Hide Post
quote:
I believe these features were added in 8204.
Yes, it works in 8204 (in DEFINEs). But, not available in the 'Format Selection' section of IA's UI. D12CMm works.

How would this be accomplished in IA 8204? Is it available in a newer version: IA 8####?

This message has been edited. Last edited by: Doug,

 Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005 IP