Forum Discussion
Minimum and Average BY Groups
- Anonymous1 year ago
Hi All ,
Firstly , lbendlin thank you for your solution!
And villa1980 , According to your description you have multiple time values under your id, find the smallest time value and then average it by having an id under mannger right?
We start with the minimum number of days and then average based on the MANAGER grouping.Mindays = CALCULATE( MINX ( FILTER ( ALL ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) ), 'Table'[Days] ))Average MinDays by Manager = AVERAGEX( FILTER(ALL('Table'),'Table'[Manager]=MAX('Table'[Manager])), [MinDays] )If you still have questions you can check out my pbix file, I hope it helps and I would be honored if I could solve your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom ShenIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All ,
Firstly , lbendlin thank you for your solution!
And villa1980 , According to your description you have multiple time values under your id, find the smallest time value and then average it by having an id under mannger right?
We start with the minimum number of days and then average based on the MANAGER grouping.
Mindays = CALCULATE(
MINX (
FILTER ( ALL ( 'Table' ), 'Table'[ID] = MAX ( 'Table'[ID] ) ),
'Table'[Days]
))Average MinDays by Manager =
AVERAGEX(
FILTER(ALL('Table'),'Table'[Manager]=MAX('Table'[Manager])),
[MinDays]
)
If you still have questions you can check out my pbix file, I hope it helps and I would be honored if I could solve your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- villa19801 year ago
Resolver II
Thank-you for your reply, unfortunately the values returned higher than expected when using my original data.
However, when looking at quick measure and amending it slightly, this gave me the correct valuesELAPSEDDAYS min per CENTREID =AVERAGEX(KEEPFILTERS(VALUES('AVAILABLE_DIARY_DATE'[CENTREID])),CALCULATE(MIN('AVAILABLE_DIARY_DATE'[ELAPSEDDAYS])))