How to subtract two queries in a pie chart

Hello,

I am trying to understand if and how can I subtract two queries with metric data from a zabbix datasource, in a pie chart.

From what I have saw there is a ‘functions’ field on each query mode, and there are two functions available called delta and rate but I dont know if I can do this with that, or if its possible(http://prntscr.com/ji7ywx).

Or if there is a way to represent percentages and not the current value(http://prntscr.com/ji7yjy).

Anyone?

Thanks!