If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > Calculated formulas to tally data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-09, 09:30
parajourn parajourn is offline
Registered User
 
Join Date: Aug 2009
Posts: 21
Calculated formulas to tally data

Recently I've been trying to convert a report from Paradox for DOS to Paradox for Windows 11, however I've been unable to copy over a formula nor have I been able to recreate it.
In a nutshell the formula is a count function which tallies the number of records which meet a set criteria. Similar to queries, except the report I'm using relies on calculated fields to display data.
The original formula is the first formula I'm providing and my subsequent modifications are below that.

Thank in advance for any assistance.

COUNT(IIF([W1]="LC",IIF(ISBLANK([W2]),IIF(ISBLANK([W3]),IIF(ISBLANK([W4]),1,""),""),""),""))

count(IIF([ASHE5-09.W1]="LC" AND ISBLANK([ASHE5-09.W2]) AND ISBLANK([ASHE5-09.W3]) AND ISBLANK([ASHE5-09.W4]),1,""))

Numval(count((IIF([ASHE5-09.W1]="LC" AND IIF(ISBLANK([ASHE5-09.W2]) AND IIF(ISBLANK([ASHE5-09.W3]) AND IIF(ISBLANK([ASHE5-09.W4]),1,""),""),""),""))))
Reply With Quote
  #2 (permalink)  
Old 08-04-09, 10:45
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
[ASHE5-09.W1]

that's not valid syntax in a PdoxWIN report.. first thing you must do is use proper syntax.. it needs to be something like

mytable."myfield"
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
  #3 (permalink)  
Old 08-04-09, 12:49
parajourn parajourn is offline
Registered User
 
Join Date: Aug 2009
Posts: 21
Hello Steve, thanks for the prompt reply -- very much appreciated.

I tried updating the field syntax to the dot format (table-name."field") as shown below, but I'm now receiving an unknown identifier error. Does this mean I need to format the table names or iif statements differently.

"LC"),IIF(ISBLANK(ASHE5-09."W2"),IIF(ISBLANK(ASHE5-09."W3"),IIF(ISBLANK(ASHE5-09."W4"),1,""),""),""),""))))

Thanks again.
Reply With Quote
  #4 (permalink)  
Old 08-04-09, 13:42
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
I don't have pdoxwin loaded on my new laptop, so I can't test anything.. and I haven't touched a pdoxwin report in years.. have you confirmed that those functions work in a pdoxwin report, the same way as in pdoxdos?

you might need to post on the paradox community web site, to get quick accuarate answers to this.. Home - Paradox Community
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
  #5 (permalink)  
Old 08-05-09, 13:04
parajourn parajourn is offline
Registered User
 
Join Date: Aug 2009
Posts: 21
Thanks for the tip. I submitted the question to the site you mentioned, this morning, however I was just going through the Paradox 9 PAL Reference and stumbled on the section about conditional logic in calculated fields, and it turns out their example 5 is very similar to what I'm trying to complete albeit with less conditions.

I updated my formula (as shown below) but now I'm getting a " , expected" error when running the logic so by any chance, do you have any idea where I'm missing ,'s

numval(count(IIF([ASHE5-09.W1])="LC" AND ISBLANK(Ashe5-09.W2) AND ISBLANK([ASHE5-09.W3]) AND ISBLANK([ASHE5-09.W4]), "1", ""))

Thanks again.
Attached Thumbnails
Calculated formulas to tally data-paradox-example.png  
Reply With Quote
  #6 (permalink)  
Old 08-05-09, 18:55
Steve Green Steve Green is offline
Registered User
 
Join Date: Dec 2007
Posts: 282
you posted in the right place over there.. let's see what they say..
__________________
--
Steven Green - Myrtle Beach, South Carolina USA

http://www.OasisTradingPost.com

Oasis Trading Post
- Collectibles and Memorabilia
- Vintage Lego Sets and Supplies
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On