Help promsql percent same metric

Hello, I did not succeed in finding the solution on the internet, I allow myself to ask the question here. how can I find the percentage difference between 2 values ​​of the same metrics:
Example:
with:
mymetric {labela = “A”, labelB = “B”} [1h: 6m]

mymetric {labela = “A”, labelB = “B”} 1
2
3
4
5
6
7
8
9
10
I would like to have a request which gives me for example: there is 50% of request greater than 5
I use grafana

Without having too much idea of your specific scenario I believe something like

(mymetric{difflabel!=“V”} - on(other,labels) group_left() mymetric{difflabel=“V”})
/ on(other,labels) group_left() mymetric{difflabel=“V”}

The on() and group_left() functions serve to allow for performing operations against different label sets. You can also instead use ignoring() in place of on() to only need to exclude the specific label which differs.