Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting total rows in Transformer (Urgent!!!!)

Status
Not open for further replies.

Brad123

Programmer
Nov 29, 2001
9
CA
Hi,

I've got a problem where I need to be able to dynamically count the rows in Transformer to use as the denominator in a percent calculation.

I'm trying to build a cube for survey results where, for each question, I show the total responses for each category (ie. agree, somewhat agree, etc...), as well as the percentage that each category has of the total responses for each category.

for example:

Question 1 Total Responses Percent
Agree 40 40%
Somewhat Agree 60 60%
etc...

I've got the total responses for each category but I can't figure out how to count the overall total.

Any help would be greatly appreciated.

Brad
 
We have a similar situation, where we measure late or ontime as opposed to agree or disagree.

In the initial impromptu report, we have a column that tells us if the value is late or ontime. When the report is pulled into transformer as an iqd, we insert two calculated attributes into the query, in the example below, 'Late/Ontime' is a column in the iqd, and column a is a count of occurences. For example in your case it may be 'No. of people':

1 - if (late/ontime = 'Late') then (count column a) else NULL
2 - if (late/ontime = 'Ontime') then (count column a) else NULL

You then need to pull these into the measures window along with the 'count column' and create the percentages on these calculated columns, that is, each calculated column shown above, divided by the original count column.

Don't know if this is what you were looking for.

Cheers,

Adam.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top