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] Need to populate column with previous Amount if 0

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Need to populate column with previous Amount if 0
 Login/Join
 
Gold member
posted
Hi,

I have request from a user to populate "END_BAL" if it is 0 with the previous day "End Bal" so Daily Asset can be calculated (END_BAL * DLY_PRICE)

I tried the following define statement but it only worked for populating DATE 20161107.
NEW_END_BAL/P15 = IF END_BAl EQ 0 THEN LAST END_BAL ELSE END_BAL;



DATE FUND TXN UNIT_AMT END_BAL DLY_PRICE
20161104 ABC BUY 50 100 1
20161107 0 0 2
20161108 0 0 3
20161109 0 0 4
20161110 0 0 5
20161111 0 0 6
20161114 ABC SELL 25 75 7
20161115 0 75 8

Desired Output
DATE FUND TXN UNIT_AMT END_BAL DLY_PRICE DLY_ASSET
20161104 ABC BUY 50 100 1 100
20161107 0 100 2 200
20161108 0 100 3 300
20161109 0 100 4 400
20161110 0 100 5 500
20161111 0 100 6 600
20161114 ABC SELL 25 75 7 525
20161115 0 75 8 600

Any idea on this one?

Thanks,

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


WF 8105M
- Portal, Dashboard
- Rcaster, Data Migrator
- Windows 2012 Client Server
- Dev/App Studio 8105
- Data: SQL, Oracle, Neteeza,MVS
 
Posts: 78 | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
Try creating a computed or defined field that always has the previous days balance, then use your existing code with the new field.


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
Gold member
posted Hide Post
Thanks Waz.

Brain freeze this week. Figured it out.

COMPUTE NEW_END_BAL/P15 = IF END_BAL EQ 0 THEN (LAST NEW_END_BAL + END_BAL) ELSE END_BAL;


WF 8105M
- Portal, Dashboard
- Rcaster, Data Migrator
- Windows 2012 Client Server
- Dev/App Studio 8105
- Data: SQL, Oracle, Neteeza,MVS
 
Posts: 78 | Registered: October 24, 2006Report This Post
Expert
posted Hide Post
Don't forget to update the title to [SOLVED]....


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     [SOLVED] Need to populate column with previous Amount if 0

Copyright © 1996-2020 Information Builders