Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     calculating percentage

Read-Only Read-Only Topic
Go
Search
Notify
Tools
calculating percentage
 Login/Join
 
Silver Member
posted
Hi All,

I need your help on this. I tried my best but couldn't figure it out.

In the .mas file I am trying to do this

DEFINE DAYS30/D6.2% = (TOTAL / (TOTAL + M_ONE)) * 100;, TITLE = 'DAYS30',$

Total and M_ONE are database fields and the datatype is float.

The problem here is I am not getting correct result. For EX TOTAL has 11326 and M_ONE has 1350 and I should get 89% but I am getting 801%

Thanks for any help


Madhu

WF Version 7.1 Windows, SQL Server Database
 
Posts: 36 | Location: Mississauga, Ontario | Registered: April 12, 2007Report This Post
Virtuoso
posted Hide Post
Wonder if you are being bit by not having the field define large enough decimals, to handle the decimals prior to the multiplication? or do you need to multiply by 100 since the descriptor is assuming a percentage?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
I did try with D20.2 and without % as well.
I am having the same problem


Madhu

WF Version 7.1 Windows, SQL Server Database
 
Posts: 36 | Location: Mississauga, Ontario | Registered: April 12, 2007Report This Post
Virtuoso
posted Hide Post
Madhu,

Does your request do a PRINT or a SUM? You may be aggregating multiple records if you are getting 801%. It is impossible to get over 100% with the calculation you have.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Silver Member
posted Hide Post
Thanks Mickey for pointing me in right direction

Let me work on this Little more,I think I Know what the problem is. Will get back soon.


Madhu

WF Version 7.1 Windows, SQL Server Database
 
Posts: 36 | Location: Mississauga, Ontario | Registered: April 12, 2007Report This Post
Virtuoso
posted Hide Post
Madhu

Are the two fields in the same segment of the database?

Did you try to use this defined field in a define instead of in the master?

Is the result then also wrong?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
Hi Frank,

Sorry I did not notice your post. As Mickey pointed out, It was aggregating. That problem is solved.

Thank you


Madhu

WF Version 7.1 Windows, SQL Server Database
 
Posts: 36 | Location: Mississauga, Ontario | Registered: April 12, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     calculating percentage

Copyright © 1996-2020 Information Builders