NOTE: this question has come up with multiple students enrolled in the Learning course Configuring Asset Analytics with PI AF in regards to their final project.
A strong tip for all students is that PI Square Search can be your friend. Granted the first search may not find the hits you want so you may have to try different words. In regards to the question asked a couple of students did not get the expected results when using the TagTot function.
One issue a student ran into was that they were trying to take an event weighted total using the TagTot function. TagTot is time weighted though and will not work for this scenario. The following PI Square post does a great job explaining and answering this question.
This post shows a possible work around for the problem by multiplying the mean value of the tag for the specified time range by the tag count:
Tagmean('my_tag', 't', '*') * EventCount('my_tag', 't', '*')
Another issue that has come with TagTot is how it handles rates. Again the solution can be found using another PI Square post!
In this example the issue was with using KW, a unit of Power, which is secretly a rate. The rate then needs to be converted to days in order to be used in TagTot.
I have an attribute in kW. So that I can use it in TagTot, I need to convert to a rate that is in days. With the discussion about, this would be in J/d:
These are two small examples that show how PI Square can be a fantastic resource to answer your questions. Chances are you are not the first person to have that specific question and hopefully someone has already asked it