Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I find the average of the fourth quartile?
I can find the fourth quartile point using this expression: Fractile(Q21Num, 0.75).
But how do I get average of the values belonging to the fourth quartile ?
Try this
AVG({$<[Q21Num] = {">=$(=vFractile)"}>} [Q21Num])
With your variable using an equal sign
=Fractile(Q21Num, 0.75)
You could try this. Though to make sure you're getting the value you're expecting you may want to so some analysis in Excel as well.
=IF([ValueField]<Fractile([ValueField],0.75),AVG([ValueField]))
What all are your dimensions where you find the Avg?
Avg(Aggr(Fractile(Q21Num, 0.75), SomeDimensionsHere))
I've actually tried this before posting without any luck. Have you tested it yourself ?
"What all are your dimensions where you find the Avg?"
What do you mean? I'm not sure ...
You must be calculating your Fractile over a dimension right?
Dim, Fractile
A, 10
b, 20
c, 30
and now you want to find the average? What is this Dim over which you want to calculate the Average?
I guess you need to define a variable to get it to work.
Variable (called vFractile):
Fractile([ValueField],0.75)
Expression:
AVG({$<[ValueField]={'<$(=vFractile)'}>} [ValueField])
Hmm - for some reason it's not working for me.
I've have a small testsample looking like this:
RespID | Q21Num |
1 | 10 |
2 | 20 |
3 | 30 |
4 | 40 |
5 | 50 |
6 | 60 |
7 | 70 |
8 | 80 |
9 | 90 |
10 | 100 |
Using this expression: Fractile(Q21Num, 0.75) I get the value 77.5 as the fourth quartile. So far so good. Then I like to measure the average of the fourth quartile - in other words I need to calculate the average of every value higher than my fourth quartile point (77.5):
Average of 80 + 90 + 100 = 90
Please take a look at my qvf file.
Maybe this is helpful in any way: statistical aggregations - parts between frac 0.1 and 0.9.
- Marcus
Try this
AVG({$<[Q21Num] = {">=$(=vFractile)"}>} [Q21Num])
With your variable using an equal sign
=Fractile(Q21Num, 0.75)