Focal Point
[CLOSED] In Info assist GUI can I create a % off two count distinct fields?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9057000826

January 17, 2013, 05:41 PM
Tara O
[CLOSED] In Info assist GUI can I create a % off two count distinct fields?
Hi I am using the InfoAssist GUI and trying to get what percent of patients where readmitted.

I have a column in my report which is a count distinct of my VisitID's and represents the Number of patients we sent out . I have a second column which is also a count distinct of a VisitID's which tells me how many of the patients sent out came back.

I need to use the count disticnt because depending on the perameters used they many appear as comming back many times but I only want them counted once.

I want to create a new column which is the percent of patients which return by row.

I have tried :
- In the calculation screen(CNT.DST.IBI_VIEW_SNF.SNF_VW.COUNT_READMIT) /(CNT.DST.IBI_VIEW_SNF.SNF_VW.CNT_HH_DIS)
but this only returns the value for CNT.DST.IBI_VIEW_SNF.SNF_VW.COUNT_READMIT.
- Doing a define which would do the CNT.DST.IBI_VIEW_SNF.SNF_VW.COUNT_READMIT, but that did not work.

Any ideas?

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


8002 Windows
January 17, 2013, 05:57 PM
Dan Satchell
Does multiplying by 100 help?

READMIT_PCT/D4.1% = CNT.DST.IBI_VIEW_SNF.SNF_VW.COUNT_READMIT / CNT.DST.IBI_VIEW_SNF.SNF_VW.CNT_HH_DIS * 100 ;



WebFOCUS 7.7.05
January 18, 2013, 09:43 AM
Tara O
Well that gets me to ******. I changed the format to D10.1%, but still *** for any field that is not 0%.


8002 Windows
January 18, 2013, 09:51 AM
Tara O
Ok D12.2% got it to show and it is showing 100* the count disticnt of the readmit ..with a percent sign .


8002 Windows
January 18, 2013, 12:48 PM
Doug
How about creating three fields, yes 3?
VisitIDin/D12.2 = CNT.DST...
VisitIDout/D12.2 = CNT.DST...
VisitIDpct/D12.2% = (VisitIDin/VisitIDout)*100;

I may have the "(VisitIDin/VisitIDout)*100" calculation wrong. But, hopefully, you get my point.
January 18, 2013, 02:08 PM
susannah
i'm surprised that you can CNT.DST more than 1 variable in a single pass...
when i try such a thing, i get
(FOC1856) ONLY ONE DISTINCT FIELD IS ALLOWED IN AGGREGATION

of course, i am in prehistoric 7.6.8




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 18, 2013, 02:28 PM
Tara O
Its not giving me an error , but its not processing the code properly either .. so it probably should.


8002 Windows
January 18, 2013, 03:16 PM
Tara O
Well I am bailing out of figuring it out in WF , thanks for your help. I added a view in SQL with just the count and readmission then presented them as averages in IA. That way teh numbers and percents come out ok.


8002 Windows
January 18, 2013, 05:10 PM
Tara O
Well I bailed out on figuring out and made the report work by passing it integers from SQL and just going about it a totally different way. However , it should be disclosed that for the last two hours I have been working on a copy of it, and it seems to work fine if I do not have any subtotals in my report.. and now I get

(FOC1400) SQLCODE IS 8117 (HEX: 00001FB5) XOPEN: 42000
: Microsoft SQL Server Native Client 10.0: [42000] Operand data type varch
: ar is invalid for sum operator. [42000] Statement(s) could not be prepar
: ed. [] Deferred prepare could not be completed.
L (FOC1406) SQL OPEN CURSOR ERROR. : SNF_VW


8002 Windows
January 24, 2013, 10:35 AM
Kerry
Hi Tara,

The issue seems to be complicated and therefore better be addressed by a case with Customer Support Services. You may call 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.