I'm confused on the median that you are trying to calculate - is it the median of the monthly values or daily values or some other dimension
that said here is an example using superstore data
if determines the median of the sub-category in the the quarter while the base chart shows the sum of sales by category
this is the forumal
it returns this
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.