How do I write an expression to subtract an attribute value at the beginning of an event frame from the attribute value at the end of the event frame?
You could use the formula data reference to do the subtraction.
How do I assign the values at the start/end of the event frame to the "Value at End/Start" attributes?
I would recommend learning more about PI Event Frames on YouTube here.
From the attribute configuration pane select "settings...".
From settings you can change the By time Range to different options.
Best practices should be to create an Event Frame Template as the video does and not directly assigning PI Point Data References, but referencing attribute references. I would start with the video and let us know what questions you have.
Retrieving data ...