Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Calculating two fields to get gross percentage.
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Calculating two fields to get gross percentage.
 Login/Join
 
Member
posted
I have two fields STD_TRK_CNTRB_CM1_AMT and NET_RVNU_AMT.i want to compute a field as “Gross Margin %” .

for e.g value of STD_TRK_CNTRB_CM1_AMT is 1000 and NET_RVNU_AMT is 20. I want to show the value of STD_TRK_CNTRB_CM1_AMT /NET_RVNU_AMT as 20% in the report.

what would be the code?
please advice ASAP.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
 
Posts: 14 | Registered: January 15, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
1000 - 20 - 20% ?

What you need to do exactly?


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Reply With QuoteReport This Post
Member
posted Hide Post
I WANT TO CALCULATE THE PERCENTAGE WHEN BOTH THE VALUE GET DIVIDE.I MEAN 1000/20=50%.


WebFOCUS 8
Windows, All Outputs
 
Posts: 14 | Registered: January 15, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I think that what Ramkumar means is that what you are requesting: dividing 1000 by 20 is giving 50 but not 50%.

So, to calculate a gross margin percentage is much more like: (sales_amt - cost_amt) / sales_amt * 100

Or: (1 - ((sales_amt - margin_amt) / sales_amt)) * 100

In your case, if I understand properly your first post:
(1- ((1000 - 20) / 1000)) * 100 = 2%


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2347 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Calculating two fields to get gross percentage.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.