Forum Discussion
GEOMEAN???? :(
- 8 years ago
Hi again ecoale
Thanks for the additional explanation. It sounds like you want to see the same constant geometric mean across all years.
Try either of these measures:Geometric Mean of Δ = GEOMEANX ( ALLSELECTED ( ISCRITTI[AA] ), [Δ] )
or
Geometric Mean of Δ = CALCULATE ( GEOMEANX ( VALUES ( ISCRITTI[AA] ), [Δ] ), ALLSELECTED () )
My original measure would have worked as a standalone measure on a card, but not when filtered on an individual year.
Regards,
Owen
- 8 years ago
Glad to hear it worked :)
For your N* measure you should be able to do something like this (it worked for me in a test model):
N* = VAR y0 = FIRSTNONBLANK ( ALLSELECTED ( ISCRITTI[AA] ), 0 ) VAR y = SELECTEDVALUE ( ISCRITTI[AA] ) VAR N0 = CALCULATE ( COUNT ( ISCRITTI[Student_ID] ), y0 ) VAR Mg = [Mg] RETURN N0 * POWER ( Mg, y - y0 )I have used variables to make it quite clear what the components of the calculation are.
Essentially we just need to multiply the initial Student Count by Mg raised to the power of the difference between last and first years.
Regards,
Owen
Dear Owen,
I thank you for your reply, but unfortunately it is not what I am looking for.
I got a mesure changing year after year... (as in the image enclosed).
I try to indicate here the calculation I would need:
Δ_10/09 = 46.859/47.092 = 0,995
Δ_11/10 = 46.925/46.859 = 1,001
...
Δ_17/16 = 45.910/47.175 = 0,973
All these N values - I mean all the quotiens Δ_(.../...) above - are calculated by my measure Δ (that I wrote here in the previous post): then, I would like to get the geometric mean of these N quotients, that we know it is: (0,995*1,001*...*0,973)^(1/N), getting in this way a single (geometric) mean - of the variations YoY - for the entire period 2009/2017.
Better?
Hi again ecoale
Thanks for the additional explanation. It sounds like you want to see the same constant geometric mean across all years.
Try either of these measures:
Geometric Mean of Δ = GEOMEANX ( ALLSELECTED ( ISCRITTI[AA] ), [Δ] )
or
Geometric Mean of Δ = CALCULATE ( GEOMEANX ( VALUES ( ISCRITTI[AA] ), [Δ] ), ALLSELECTED () )
My original measure would have worked as a standalone measure on a card, but not when filtered on an individual year.
Regards,
Owen
- ecoale8 years ago
Helper I
My friend Owen........ the first one works! :D Thanks a lotttttt!
So I would use your kindness just for unother trouble to hard for me... :/
At this point, I would need a final mesure which provided - por year - with the number of students previously increased by the variation observed on average in the period; we may indicate that "new" number of students for example with N*.
In other words, if N is the original number of students (in the table enclosed in my first reply) and Mg is the geometric mean (that is the first measure of yours in your previous reply, the measure that now works), well I need a second measure the calculates the following:
For year 2009: N*_2009 = N_2009 = 47.092 (no calculations here, since it is the first year of the period)
For year 2010: N*_2010 = N*_2009 * Mg = N_2009 * Mg = 47.092 * Mg
For year 2011: N*_2011 = N*_2010 * Mg
...
For year 2017: N*_2017 = N*_2016 * Mg
So, according to the meaure I am looking for as last, after the year 2009 (the first one), the geometric mean (Mg) has to be multiplied for the number of students but already previously multiplied for Mg in the previous year...
May you help me again Owen?
Thanks a lot dear
Ale
- ecoale8 years ago
Helper I
My friend Owen........ the first one works! :D Thanks a lotttttt!
So I would use your kindness just for unother trouble to hard for me... :/
At this point, I would need a final mesure which provided - por year - with the number of students previously increased by the variation observed on average in the period; we may indicate that "new" number of students for example with N*.
In other words, if N is the original number of students (in the table enclosed in my first reply) and Mg is the geometric mean (that is the first measure of yours in your previous reply, the measure that now works), well I need a second measure that calculates the following:
For year 2009: N*_2009 = N_2009 = 47.092 (no calculations here, since it is the first year of the period)
For year 2010: N*_2010 = N*_2009 * Mg = N_2009 * Mg = 47.092 * Mg
For year 2011: N*_2011 = N*_2010 * Mg
...
For year 2017: N*_2017 = N*_2016 * Mg
So, according to the meaure I am looking for as last, after the year 2009 (the first one), the geometric mean (Mg) has to be multiplied for the number of students but already previously multiplied for Mg in the previous year...
May you help me again Owen?
Thanks a lot dear
Ale
- OwenAuger8 years ago
Super User
Glad to hear it worked :)
For your N* measure you should be able to do something like this (it worked for me in a test model):
N* = VAR y0 = FIRSTNONBLANK ( ALLSELECTED ( ISCRITTI[AA] ), 0 ) VAR y = SELECTEDVALUE ( ISCRITTI[AA] ) VAR N0 = CALCULATE ( COUNT ( ISCRITTI[Student_ID] ), y0 ) VAR Mg = [Mg] RETURN N0 * POWER ( Mg, y - y0 )I have used variables to make it quite clear what the components of the calculation are.
Essentially we just need to multiply the initial Student Count by Mg raised to the power of the difference between last and first years.
Regards,
Owen
- ecoale8 years ago
Helper I
My friend........it is just what I need! Thanks a lot :) :) :)
Above all for the time you dedicated me.
Have a beautiful day
Ale