Difference between daily data

Hello Everyone,

I have a dataset composed of daily availability data for our machines.
I want to achieve a result like this one below:

Machine ID Performances on 30th September Performances on 29th September Difference
103010008 100 98.7 1.30
103010016 98.49 99.4 -0.91
132010010 87.85 95.6 -7.75
201010007 96.85 87.9 8.95
204010007 100 98.1 1.90
207010007 100 96.3 3.70

In the dashboard I am developing there is a filter based on Machine ID like the one in the example above. This filter is fixed with the IDs provided.
What I want to do is create a table that displays daily average availability for each machine on the previous day in one column and the same data in another column but filtering for 2 days before instead.
Moreover, I would like to add a column for the difference of these values.

How Can I achieve such result?
At disposal for further clarifications if needed.

Best Regards,

Daniele

@dorto.daniele
you can’t do dynamic columns in QS.

So I cannot get the trend day over day as form of a value in a table?

@dorto.daniele, you can try to achieve this using below steps
1/ create a pivot table with machine id as rows and date as column with performance as values.
2/ Use now() to get the current date value and then use adddatetime() function to get date value for past 2 days by subtracting 2 days from Now().
3/ apply this calculated date as filter to show only last 2 days of data

Let us know if this approach works for you.