Skip to main content
Hi Community,
Im currently building a Map in Celonis that shows the number of events per Location or Country. The calculated KPI uses a regular COUNT Function and is shown perfectly fine on the component.
Now I want to apply coloring threshholds according to the data shown on the Map. The highest thresshold is supposed to be the maximum the KPI on the Map. Lets say the marker Germany has the highest number for the calculated KPI, e.g. 1000. Then the thresshold for red should be 1000, 800 for orange and 600 for yellow.
Sounds easy, right? Well, it isnt. Although you can generally use functions to calculate the threshholds, you cant accomplish this behaviour in a consistent way:
  • Wed need to manually aggregrate the KPI towards the Location, then take the MAX
  • The way do determine the MAX per Location would be to use MAX and a PU-Function inside (with a Domain Table for the Location).
  • This works if youre not applying any selections.
    As soon as you filter your dataset, that function will no return proper results because PU-functions ignore Selections. Thus, the thressholds remain the same when you apply a selection, effectively not representing the shown data any more.

Any ideas on how this could be accomplished?
I like the map component, but unfortunately it doesnt nearly live up to its potential.
Maybe the above use case is something you could build into the component by default.
Any help is greatly appreciated.
Best
Max

Hi Max,

 

I believe this is true because you are using PU functions. PU functions are not taking filters into consideration per default. Please try to incorporate a FILTER_TO_NULL and the results should be correct.

 

Best

Kevin


Hi Max,

Alternatively, I believe you could achieve the result in an easier manner using INDEX_ORDER.

This functions returns an integer number like a ranking and it works on top of KPIs, including grouping per location.

So INDEX_ORDER(CalculatedKPI, PARTITION BY ( "countryDetail"."location" )) should return you the top 1 per location. From there, you can make whatever aggregation you want (i.e. get the index and divide by the MAX value of the INDEX_ORDER to have a relative comparison to use in the coloring thresholds )

Best,

Gabriel


Reply