A situation when neither the mean nor the median is a good descriptor for a dataset is when the data set is U-shaped.
In a U-shaped distribution, the majority of the data points are located at both extremes (the lower and upper ends), with a gap in the middle. In such cases, the mean may be heavily influenced by the extreme values at the tails, while the median may not adequately represent the central tendency since the bulk of the data is on the edges rather than clustered around a central point. Therefore, both the mean and the median fail to accurately describe the true nature of the distribution.