Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have 8 fields in a table:
a - b - c - d - e - f - g - h
The values within these fields can be between 1 and 6. 6 = very Good. 1 = Very bad.
I have grouped the first 4 fields and the second 4 fields into 2 groups: a_to_d and e_to_h.
Within the LOAD script i did this like this:
LOAD
a + b + c + d as a_to_e,
e + f + g + h as e_to_h
...
What i want now is in a chart to calculate the % values for a_to_d and e_to_h (e.g. over time).
My problem: How does the expression look like, if a value of 6 = Very Good = 100 % and a value of 1 = very bad = 0 % ?
Is it avg(a_to_e) / 6 ?
Hope, the description is clear...
Thanks in advance,
K
it's not 100% clear what you want with the % ...
In what view do you want to see the % ...??
You say:
kalinkula wrote:
6 = very Good. 1 = Very bad.
...
6 = Very Good = 100 % and a value of 1 = very bad = 0 %
Is there only 1 of the a ... h filled?? So this can be translated into a percentage?
Or is every value possibly filled?? ... in this case you probably want to know the numbers choosen translated into a percentage?
rgrds
A
Hi Anita,
thanks for the reply. Please consider the following table as an example:
UserID | a | b | c | d | e | f | g | h | a_to_e | e_to_h |
---|---|---|---|---|---|---|---|---|---|---|
11 | 3 | 5 | 1 | 6 | 5 | 2 | 1 | 4 | 15 | 12 |
22 | 4 | 3 | 5 | 1 | 5 | 6 | 2 | 2 | 13 | 15 |
33 | 1 | 1 | 2 | 2 | 1 | 4 | 1 | 1 | 6 | 7 |
You see, every field is filled. The a_to_e and e_to_h are just the aggregates of the the first 4 and the latter 4 columns.
How would be the formula to calculate the % value of a_to_e ?
Regards,
K
a percentage could be: a_to_e / (a_to_e + e_to_h)
but I assume you do want it somehow different?