Skip to main content

Hi, my Average of a PU-Function outputs two different values, when used in a table or a single KPI, when filtered for a dimension.

 

When I use this simple PU function:

 

AVG(PU_COUNT("_CEL_RADAR_ACTIVITIES_CASES", "_CEL_RADAR_ACTIVITIES"."PROCESS"))

 

this happens:

 

imageI have validated, that the output within the KPI is the right one, when filterd by a Dimension (in this case by "Deutschland"). Within the table however, the very same formula leads to wrong results. How can I fix it? What is the reason for it?

 

I am just getting started with PQL. Since I could not find an answer within the forum, I hope you guys can help me. Thx

 

Best, Max

 

 

Hi Maximilian,

 

PU functions are not affected by filters, hence the behavior.

 

Here's the documentation paragraph describing this:

 

Filter behavior

The way PU-functions handle filters is different compared to the standard aggregation. In contrast to the standard aggregation, PU-functions ignore filters, meaning that if a filter or a selection is changed, the result of the PU-function is not recalculated. Another difference to the standard aggregation is that it is possible to filter on the result of a PU-function. However, FILTER statement can be propagated to input column via FILTER_TO_NULL operator before PU-functions are executed.

 

Hope this helps

 

Eugene


Thank you very much for the quick support (I tried your solution and unfortunately it did not solve my issue). When appying the same situation to an other dataset (SAP P2P) the formula and filtering works just fine. This leads to the conclusion, that there is some issue within my data or data model? But I still find it odd, that filtering the formula within a single kpi or an olap table without any dimensions works fine. Only when I add dimensions to the OLAP table somethings goes wrong.

 

I only have one activity table containing all the information about the different dimensions and one automatically gernerated case table. Is there any rule of how you have to keep your dimensions in your data model in order for an OLAP Table to work fine with PU functions?

 

If you think the issue can be solved with a different formula, I would be glad if you could suggest the solution :)


Hi Maximilian,

 

Have you tried running it without a PU function, just as a simple AVG aggregation? The purpose of PU is not quite clear to me in this case.

 

Following my previous comment - I think that the 20.12 is the overall AVG across the 4 regions shown, and when you filter on one of the values there the KPI is not updated because the PU function ignores the filter.


Hi Eugen, I need a PU function, since I want to count the average Process steps by case for a given dimension. In this case "region". The same issue occures, when e.g. trying to calculate the average throughput time of a case and then wanting to compare different dimensions. The 20.12 is already filtered by "Deutschland". It is not the overall score over all regions. As I mentioned, within an other data set everythings works fine.

 

Example of SAP P2P Data Model: Here the formula for both, the KPI tile and the KPI within the OLAP Table :

 

AVG(PU_COUNT("EKPO", "_CEL_P2P_ACTIVITIES_EN"."ACTIVITY_EN"))

 

And the outcome:

PU_ProblemWhen you compare it to my originally posted screenshot and description of my problem, you can see, that I did the same, but got different results...


Reply