Skip to main content

Is there any way to reference a calculate column in a filter inside a component like olap table ?

 

My problem is that when i want for example filter a olap table with activity and %automation than %automation rate was less than 100% i can no filter like

 

FILTER KPI("Ratio", "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'Automated') > 0

 

Cause it raise an error saying that a filter can no use aggregate funcion like SUM.

 

If i can reference a filtre for a calculate colums %Automate = KPI("Ratio", "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'Automated'), and in the filter i can filter by column like

 

 

FILTER '%Automate' > 0

 

Then,¿is is posible to filter data by column ? ¿ How can i do it ?

 

 

Thanks in advance

 

Hi @enrique sanchez alonso ,

 

I believe in your case you need to resort to a PU_SUM() instead of a SUM in the filter.

The PU_SUM function calculates the sum (column as the second argument) for each row in the table you provide as the first argument.

The documentation around PU functions is quite extensive and worth a read if you're unfamiliar.

 

Please let me know if this worked!!!


Hi @joos.buijs 

 

Thansk for your answer. I have to use Domain Table to resolve.

 

 

 

FILTER PU_AVG(DOMAIN_TABLE("_CEL_AP_ACTIVITIES"."ACTIVITY_EN"),CASE WHEN "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'Automated'  THEN 1.0 ELSE 0.0 END ) < 1

 


Reply