Have the median of a sensor

Hi,

I’d like to display the long-term self-sufficiency of my solar power.
I have an entity to display the daily value in %.

I’ve read through “statistics” documentation, but to be honest, I don’t really get it…
Can anyone point me a way for this task? Thanks!