Without looking into your dataset, have you tried calculation like this?
1. If [Outcome]=1 THEN [PAO] END
2. If [Outcome]=1 THEN [NAO] END
This is a great idea....
Further notes on the dataset...
[Outcome] is a categorical string dimension with values '0' and '1'
(IF ATTR([Outcome]) = '1' THEN [PAO] END)/(IF ATTR([Outcome]) = '1' THEN [NAO] END)
but it says...
'The table calculation ... requires a field that is missing.....'
I just wanted to check back if the link provided above helped you to solve your problem or not? If so, please mark it as correct answer else please post your sample data and we will figure out it for you. Thanks
Thank you for checking back with me, I have been out of town and just now had the chance to check the thread. It does not seem to be what I am aiming at from what I can tell. I have re-framed the problem and added an image, details, and my ultimate aim below.
(Detailed pill explanations)
N-Proportion of Outcome: this is the percent of total number of records calculated across outcome for each val/D source level as a proportion
Total AdmitICD per Outcome: this is a total(sum(number of records)) for each outcome
Total Other AdmitICD10: this is Total AdmitICD per Outcome minus sum(number of records)
(What I am trying to accomplish)
I'd like to be able to have a live odds ratio calculation for each val/D Source level that I can show to an audience independently when they request a specific D Source. The desired equation is as follows:
For each val/D Source combination:
(N): (N-Proportion of Outcome|Outcome=1)/(N-Proportion of Outcome|Outcome=0)
(D): (Total Other AdmitICD10|Outcome = 1)/(Total Other AdmitICD10|Outcome = 0)
Odds Ratio = (N)/(D)
psuedo_data.twbx 1.2 MB