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     Descending order [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Descending order [SOLVED]
 Login/Join
 
Platinum Member
posted
Hi All,
i want my Counter should be in descending order and also i want only first 5 records
 
-DEFAULT &END_DATE = 100110
-SET &END_DATE = EDIT(&END_DATE, '99/') | EDIT(&END_DATE, '$$99$$/') | EDIT(&END_DATE, '$$$$99') ;
DEFINE FILE CAR
COUNTER/I5 = 1;
END
TABLE FILE CAR
SUM
CAR
MODEL
COUNTER
BY CAR NOPRINT
WHERE DEALER_COST GE 4915
END
 


Thanks,
Krish.

This message has been edited. Last edited by: Krishna.edara,


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Virtuoso
posted Hide Post
  DEFAULT &END_DATE = 100110
- INCLUDE MXTRACKLOG.FEX
-SET &END_DATE = EDIT(&END_DATE, '99/') | EDIT(&END_DATE, '$$99$$/') | EDIT(&END_DATE, '$$$$99') ;
DEFINE FILE CAR
COUNTER/P8 WITH CAR =LAST COUNTER+1;

END
TABLE FILE CAR
SUM
CAR
MODEL
 
BY LOWEST 5 COUNTER  
BY CAR NOPRINT
WHERE DEALER_COST GE 4915
END
 


 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
Hi Prarie,
Thanks for reply...
it is working fine but it is not reaching my requirement,
the model should count if it repeats(iam counting the repeted Models only )
iam getting with following code but iam unable to get the highest 5 in Decending order.
In this Example the Model is not repeting, but in my case it will repeate so i want to count them and should show in Decending order of first 5

 
DEFINE FILE CAR
COUNTER/P8 =1;
END
TABLE FILE CAR
SUM
CAR
MODEL
COUNTER
BY HIGHEST 5 COUNTER  NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
WHERE DEALER_COST GE 4915
END 


Thanks,
Krish.

This message has been edited. Last edited by: Krishna.edara,


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Gold member
posted Hide Post
krish,

I'm unclear of what the purpose of your counter is? If you just want the first 5 records in a table then I would use WHERE RECORDLIMIT EQ 5 to get the first 5 records. But then you have no control over the actual order that they are in. What do you mean the Model should count if it repeats? In this example if you want to know the 5 Countries that have more then 1 car I would write my code as such:
(I changed it to 3 Countries that have more then 1 car because there weren't enough qualifying countries that satisfied the point.)

  
DEFINE FILE CAR
COUNTER/I8=1;
END
TABLE FILE CAR
SUM COUNTER
	CAR NOPRINT
	MODEL NOPRINT
BY HIGHEST TOTAL COUNTER
BY COUNTRY
WHERE TOTAL COUNTER GT 1
ON TABLE HOLD AS CARS
END
TABLE FILE CARS
PRINT COUNTER
BY HIGHEST  COUNTER
BY COUNTRY
WHERE RECORDLIMIT EQ 3
END


Am I close to understanding what you are trying to acheive?


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Virtuoso
posted Hide Post
Something like this?

IF MODEL EQ LAST MODEL THEN COUNTER+1 ELSE 0;

You will have to set the counter to 0 to start.

Do some searches here on the Forum of different ways to do counters.

Search on COUNTER
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
Hi EWoerle,
My actual intention is to count the Hits on Tag and show the top 5 Hits on Tag,
Here is my actual code iam using

 
-DEFAULT &END_DATE = 101010
-SET &END_DATE = EDIT(&END_DATE, '99/') | EDIT(&END_DATE, '$$99$$/') | EDIT(&END_DATE, '$$$$99') ;
DEFINE FILE LOG
HIT/P8 = 1;
HITS/P8 WITH TAG =HIT;
END
TABLE FILE LOG
SUM
PROGRAM 
TAG 
HITS 
BY HIGHEST 5 HITS NOPRINT
BY PROGRAM NOPRINT
BY TAG  NOPRINT
WHERE LOGDATE GE '&END_DATE'
END


Thanks,
Krish.


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Gold member
posted Hide Post
Krish,

Have you tried either of the suggestions that Prarie or I have given you? It seems that either one or a combination of the both should have your answer in it. Is there a piece of either one of our codes that you would like us to explain better that maybe you didn't understand?

From what I am reading you want to know who your top 5 users are that are running reports. If that is correct then you have everything you need to acheive that and me writing the report for you will not help you learn.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Platinum Member
posted Hide Post
Thanks EWoerle and Prarie,
It did worked for me.

Thanks,
Krish.


WebFocus-8/Windows/HTML, PDF, EXCEL
 
Posts: 106 | Registered: September 20, 2010Report This Post
Expert
posted Hide Post
Krish, have you considered going on training, it will assist you in some of these basic questions.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     Descending order [SOLVED]

Copyright © 1996-2020 Information Builders