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     [SOLVED] How to compare a set of values?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to compare a set of values?
 Login/Join
 
Gold member
posted
Hi,

I have a result grid like this and I would like to select the rows where the last column value (variation) are the same for the same client. For example, in this case, I want to select the lines concerning the clients 44101 and 49747 in order to put them in red. Is there a way to make that?

CLIENT PRODUCT VARIATION

44101 ABC 44.56
44101 FDG 44.56
44101 GTR 44.56
44101 ZUF 44.56

45212 BAC 23.27
45212 FFG 09.51
45212 GTR 44.56
45212 ZUF 39.23

49747 KHG 95.22
49747 FRT 95.22
49747 SZT 95.22

51236 QWE 07.32
51236 HHG 08.25
51236 ZUJ 22.36

The code used for obtaining this gris is:

  
TABLE FILE MYTAB
PRINT 
PRODUCT
VARIATION
BY CLIENT
END


Thanks for your help,

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
Jereny,

ALL the same or at least 2 the same?


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, 2006Report This Post
Gold member
posted Hide Post
All the same.


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 2007Report This Post
Virtuoso
posted Hide Post
Jereny,

This should do the trick:
  
SET ASNAMES=ON
TABLE FILE JERENY
SUM CNT.DST.VAR AS SAMEV
BY CLIENT 
WHERE TOTAL CNT.DST.VAR EQ 1
ON TABLE HOLD AS SAMEVAR FORMAT FOCUS INDEX CLIENT
END
JOIN CLIENT IN JERENY TO CLIENT IN SAMEVAR AS J
TABLE FILE JERENY
PRINT VAR SAMEV NOPRINT
BY CLIENT BY PRODUCT
ON TABLE SET STYLE *
TYPE=DATA, COLOR=RED, WHEN=SAMEV EQ 1, $
ENDSTYLE
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, 2006Report This Post
Virtuoso
posted Hide Post
Or, in a single step,
  
TABLE FILE MYTAB
SUM 
  MIN.VARIATION NOPRINT
  MAX.VARIATION NOPRINT
  COMPUTE SPREAD/P12.2 = MAX.VARIATION - MIN.VARIATION ; NOPRINT
BY CLIENT
PRINT 
  PRODUCT
  VARIATION
BY CLIENT
WHERE TOTAL SPREAD EQ 0;
END


This MIN/MAX/SPREAD approach works only for a numeric field; Danny's CNT.DST. method does not have that restriction.

On the other hand, if VARIATION is a floating-point field, identical displayed values may have slightly different underlying internal values. Then CNT.DST.VARIATION would treat them as differing and drop them from the report, whereas the P-format for SPREAD -- which rounds a "nearly zero" computed spread to zero -- will ignore the fuzz and render the expected result.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Jack,

Your approach is better and with the following you also take care of numeric and alpha:
TABLE FILE MYTAB
SUM 
  MIN.VARIATION NOPRINT
  MAX.VARIATION NOPRINT
  COMPUTE SPREAD/I1 = IF MAX.VARIATION EQ MIN.VARIATION THEN 0 ELSE 1; NOPRINT
BY CLIENT
PRINT 
  PRODUCT
  VARIATION
BY CLIENT
WHERE TOTAL SPREAD EQ 0;
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, 2006Report This Post
Gold member
posted Hide Post
Thanks a lot Danny and Jack.

I tested the first method posted by Danny and the result is correct. I will try now with the Jack's method.


WebFOCUS 7.6.4 running on Windows
Output formats : PDF, Excel and HTML
My blog
 
Posts: 61 | Location: Luxembourg | Registered: October 31, 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     [SOLVED] How to compare a set of values?

Copyright © 1996-2020 Information Builders