Please let me know logic to calculate how many days in a month in PI AF.
Hi Seb Sebastien Raposo,
1. We have below logic in our analysis which is evaluating 1st day of the month at 00:00 but we want to evaluate it to 2nd day of the month at 00:00. How can I change it so that it will evaluate as per the requirement?
2. By default current calculation is multiplying with 31 days but we want to multiply with number of days in a month. Because of this calculation we are getting wrong results for months which are having 28 or 29 or 30 days in a month.
Kindly help me.
You could try the following expression:
Use the Int as I did if you do not want to account for DST, else remove the Int.
You can get the 2nd day of the month using this: Parsetime(Concat(Month(Bom('*')),"-2-",Year(bom('*'))))
Nice and that reminds me of another little trick is: Parsetime("2") to get the second day of the month!
Now, it is was a PE... the problem would be simple: bom('*') + '1d'
As we are using TagAvg is for Time-weighted and which function we are using for Event-Weighted calculation?
We added an overload in 2018 SP2 to the summary functions (TagAvg(), etc...) to perform event weighted calculations. Can you upgrade?
We are not planning to upgrade it to 2018 as of now. Do we have any other suggestions?
You can use TagMean() for event weighted average. For event weighted totals you could use TagMean() * EventCount() though this isn't a perfect solution. The best solution is to upgrade
Retrieving data ...