How to calculate the difference in Grafana using transformation

Steps to calculate diffrence:

Step 1: Go to grafana and create new dashboard

Step 2: Now click on add visualization and add transformation

Step 3: Now click on reduce field and add Last *(for first not null values) and difference

Step 4: Now click on add another transformation and add partition by values transformation

Step 5: Now set field to field

Step 6: Now select the concatenate fields

Step 7: Now select Organize fields by name and type the original name

Now remove unnecessary fields

Final outcome:-