[CLOSED] Calculating two fields to get gross percentage.
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
April 16, 2015, 07:14 AM
Ramkumar - Webfous
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
April 16, 2015, 09:30 AM
NIrojKumar
I WANT TO CALCULATE THE PERCENTAGE WHEN BOTH THE VALUE GET DIVIDE.I MEAN 1000/20=50%.
WebFOCUS 8 Windows, All Outputs
April 17, 2015, 07:29 AM
MartinY
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