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]Calculate TOTAL using filter in Master file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Calculate TOTAL using filter in Master file
 Login/Join
 
Platinum Member
posted
Hi All,

May be I am wrong. But I want to know ,
Can we create a DEFINE/COMPUTE field for storing total of a field using filters in Master file.

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


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Virtuoso
posted Hide Post
Could you describe a use case for such a thing?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Employee Manager developer tester
x 0 0 1
y 1 0 0
z 0 1 0

In above, scenario I have to calculate Number of manager, number of developer and number of tester.


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Master
posted Hide Post
Neelima,

You can definitely create a compute field in the Master file. just include the compute logic in the segment for the compute. I don't understand what you mean by "Using Filters". Maybe you want to try using the synonym editor to create some basic samples for yourself.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Platinum Member
posted Hide Post
Empid manager_flag Developer_flag tester_flag project
a N N Y PROJECT A
B Y N N PROJECT A
C N N Y PROJECT B
D Y N N PROJECT A
E N Y N PROJECT B
F Y N N PROJECT A

like above, I need to calculate how many employees are manager, developer and tester for particular project.for that, I need to create compute field in MASTERFILE for that,I have tried with
DEFINE TOT/D12=TOT.empid; TITLE='Manager Count',RESTRICT = VALUE_WHERE,VALUE = Manager_flag EQ 'Y'; $

ABOVE code is not giving the correct result.

Please suggest.


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Platinum Member
posted Hide Post
can you share some code for WHERE based COMPUTE and DEFINE..


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Platinum Member
posted Hide Post
I have used filter in MASTER file. Its give me the following error

(FOC36241) FILTERS DON'T EXIST FOR FILE NAME


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Master
posted Hide Post
Neelima,

the code: RESTRICT = VALUE_WHERE,VALUE = Manager_flag EQ 'Y'; $

is something that you would add as part of the DBA restrictions. From what you are describing, thats not what you are doing. I think you are over thinking this. Just write a simple define.

DEFINE MNGR_FLAG/I8=IF MANAGER_FLAG EQ 'Y' THEN 1 ELSE 0;
 


Then just agreggate it at what ever level you need it in your query. You could use multi segment master files to do this... but chances are that you don't need that. I would just keep this simple for now.

TABLE FILE MYTABLE
SUM EMP_FLAG
BY PROJECT
END  


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Platinum Member
posted Hide Post
quote:
EMP_FLAG

Thanks Eric,

I have already done this code in my master file but it is not giving me the correct result.

I have to count distinct number of employee by project.


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Platinum Member
posted Hide Post
I have done this Business logic in fex using hold files and MATCH file command.
Thank you all..


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report 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]Calculate TOTAL using filter in Master file

Copyright © 1996-2020 Information Builders