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.
Good afternon. Someone can help , i need calculate the mode arithmetic of a serie of number,for example : I have diferents number 16 ,18 ,19 ,20 , 20 ,21 the mode aritmetic is 20 , there is some way for make this.
Thanks for everything.This message has been edited. Last edited by: Kerry,
Do you know how to calculate this in excel? Or in any other program without using an per designed formula? In other words do you know the mathematic formula. If you do, you can create this. You can create an external formula and use that.
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, 2006
To calculate mode, the entire population has to be examined in order find the prevalent value(s). Here is an example using the CAR file and two TABLE commands: DEFINE FILE CAR INSTANCE/I9 = 1; END TABLE FILE CAR SUM INSTANCE BY SEATS ON TABLE HOLD END TABLE FILE HOLD PRINT SEATS INSTANCE BY HIGHEST INSTANCE NOPRINT END The first pass will identify the mode and the second will print the instances out in high to low order. Be wary of multi-modal distributions. In this example, SEATS = 5 is the mode. HTH (from Maui)This message has been edited. Last edited by: jimster06,
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003
If you are looking for most frequent occurance, then here is the sample code.
TABLE FILE CAR
SUM
COMPUTE CNT_SEATS/I2=CNT.SEATS;
BY SEATS
ON TABLE HOLD
END
TABLE FILE HOLD
BY HIGHEST 1 CNT_SEATS
ON TABLE HOLD AS HOLD_2 FORMAT ALPHA
END
-RUN
-READ HOLD_2 &MAX_CNT.I2.
-? &MAX_CNT
TABLE FILE HOLD
PRINT
SEATS
CNT_SEATS AS 'No of Occurance'
WHERE CNT_SEATS EQ &MAX_CNT;
END
Note: Final result will give you mode values. Works for both Uni-Model and Multi-Model.
I don understand this solutions, I try make this: TABLE FILE INFORME
COUNT ENTRIES AS 'FRECUENCIA' BY AGE PRINT *
-*ON TABLE HOLD AS INFORME2 FORMAT FOCUS END -RUN thi give 2 cols , after i want get age whit more frecuency . Thanks for all, but somebody can help me.
Sorry...I have now idea what you mean and what you want. Can't you post an example based on one of the sample databases so we might better understand the problem
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, 2006
Ram has the right solution. I think we need to look at what his data set would look like: 2,2,2,2,2,4,4,4,4,4,5,5,5,5,5,5,5,5 Five twos, five fours and eight fives. The most prevalent value is 5 - which is the mode. You can have multiple modes if there is a tie.
Developer Studio 7.7.05 Application Studio 8.0.09 Windows 7 All Formats
Posts: 16 | Location: Seattle, WA | Registered: November 29, 2012
I try get mode serie of numbers example i have ages 19.20 ,21,23,21, the mode is 21. i have by titulation example TABLE FILE EXPEDIENTS SUM COUNT ENTRIES BY AGE END whit this i have 2 columns frecuency and age ,but i dont know how get the mode, also need group by titulation: AGE FRECUENCY MODE 19 1 18 3 18 18 17 1 I need mode. This proble this solutioned whit sql whit sql ora. I want give one thousand thanks, this focal is gratefull i hel me all days in my job. Thanks.
-SET &ECHO=ALL;
SET HOLDLIST=PRINTONLY
SET ASNAMES=ON
TABLE FILE EXPEDIENTS
SUM COUNT ENTRIES AS NUMBER
BY AGE
ON TABLE HOLD
END
TABLE FILE HOLD
BY HIGHEST 1 NUMBER
ON TABLE HOLD AS XXX FORMAT ALPHA
END
-READ XXX &MOD.I5
DEFINE FILE EXPEDIENTS
MODX/A1=IF AGE EQ &MOD THEN '*' ELSE '';
END
TABLE FILE EXPEDIENTS
PRINT EMPLOYEE
AGE
MODX
FOOTING
"These are all employees, the mod is &MOD"
END
I have no idea if EMPLOYEE is a field in your database, but this could also be CLIENTNAME. If you copy this code exact as posted, I want you to tell us what you get and if this is what you need. If there is an error you should see that too.
I hope this works..
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, 2006
According to Wiki: "The mode is the value that appears most often in a set of data"
So using the CAR file and the field MPG:
TABLE FILE CAR
SUM CNT.MPG AS MPGCNT
BY MPG
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END
TABLE FILE HOLD
SUM MAX.MPG AS MPG_MODE
BY HIGHEST 1 MPGCNT NOPRINT
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Hello Danny. I like you solution , i wold need some more ,i need this field mode and all field of table ,is possible i don t explain very good . After i have work whit others field understand?
Forgive , i could not answer all person ,i have little time a lot of work, you solution is good , you get a column mode for all hold , i want diferents mode for diferents titulations ,my problem is dificult explain in english,a lot of thanks i get this whit sql , i like you idea is good.
DEFINE FILE EXPEDIENTS MODX/A1=IF AGE EQ &MOD THEN '*' ELSE ''; END