Column order of pivot table

I know that this has been already a topic but I couldn’t find an answer for my problem.

I need to pivot a table then I need to perform calculations on the pivoted columns, where the column order matters: I need to deduct the amount from of the current day from the amount of a previous day.

The values of the “Period” column will be dates of specific days. How do I know, which column to add to left and right side of the formula?

thank you

Pivot Column Order.knwf