How to split a PI tag into real-time and historical values for comparison in PI Vision

Hi everyone,

I'm trying to achieve the following behavior in AF and PI Vision, and would appreciate your guidance:

I have a PI Point (for example: a power load tag), and I want to split it into two attributes:

  1. One attribute that always shows the real-time (now) value, and does not change even when the time range is adjusted in the PI Vision display. It should act as a fixed reference point — always showing the current snapshot value.
  2. A second attribute that behaves normally — i.e., when the time range in the PI Vision display is changed, this attribute should show the value of the tag at that historical point in time.

My goal is to display both values on the same trend in PI Vision, so I can visualize the delta between the current (now) value and the historical values over time. This should help me understand how the tag’s value has changed compared to now.

I also want to calculate the delta (difference) between the two values inside AF — the current snapshot minus the historical value for the given time context.

 

I’ve tried using TagVal(tag, '*')

for the current value and directly referencing the tag for the time-context value, but I still haven’t achieved the desired behavior — especially when viewing this in PI Vision. The real-time attribute still responds to time context, and my delta calculations return zero or don't behave as expected.

Any advice or example setups (AF expressions, tag configurations, PI Vision tricks) would be highly appreciated!

 

Thanks in advance!