10% trimmed mean of calculated field

Hi,

Is there a way to calculate the 10% trimmed mean of a calculated field?
my field is the below

avg(dateDiff({Event Creation Date},{T1 Date},'MI'),[{T1 ID}])/60

Hi @pantelis,

As there’s no out of the box function that can easily handle this requirement, you’ll most likely need to utilize a work around; however, Quick Sight does not allow the nesting of an aggregate function inside another aggregation. So trying to find the percentile’s of a field you’re already running the average on, like your example, may result in aggregation errors.
To avoid this, it may make more sense to move your original calculated field to the dataset layer so that the calculation is handled ahead of time and while not result in an error.
Once that’s been completed, try using the percentileCont or percentileContOver function to find your top and bottom 10th percentiles and then filter them out.

Let me know if this could work for your case or if you have any additional questions.

Hi @pantelis,

Hope this message finds you well! Was Brett’s suggestion helpful to you or were you able to find a solution on your own in the meantime? If not, please feel free to comment on any questions or concerns you may have. If we do not hear back in the next 3 business days, I’ll go ahead and close out of this topic.

Thank you!

Hi @pantelis,

Since we have not heard back, I’ll go ahead and close out of this topic. However, please feel free to post again in the Quick Sight Community and link this thread for any relevant information if needed.

Thank you!