Filter By Comparing 2 Parameters Value

Hello Everyone,
Is there any way to filter by comparing 2 device or virtual parameters ?
I need it to to create a chart .
Thanks in advance.