Total time the value in the graph was above valueA

Hi Team,

I want to find the total time spent in the graph with the value above a threshold valueA- 30% in my case. I am new to grafana and reading the docs but haven’t been able to come up with a solution. tried summarize function but it is not solving my problem.

How can I achieve this?