Skip to main content
Solved

Applying filter to KPI calculation

  • May 19, 2022
  • 3 replies
  • 28 views

Hello everyone,

here is my case: I am using SAP table CRMD_ORDERADM_H as case table. I am using PU_SUM to have an OLAP table column with the sum of CRMD_ORDERADM_I.NET_VALUE grouped by CRMD_ORDERADM_I.HEADER (case id). I am using a dropdown to filter for CRMD_ORDERADM_I.ORDERED_PROD. It works in so far that the table only shows cases, where at least one item has the selected PROD, but the sum stays the same.

I would like the filter to be applied to the sum.

In case you are not familiar with SAP tables - I added a mock up of what I am trying to do.

Have you got any ideas how I could accomplish that?

Thanks in advance!

Best answer by neil.whita

Hi Alex,

 

I think you want to use FILTER_TO_NULL here but I believe it's quite intensive and can affect query performance.

 

So instead of PU_SUM(CASES,CRMD_ORDERADM_I.NET_VALUE)

 

you apply FILTER_TO_NULL around the column

 

So instead of PU_SUM(CASES,FILTER_TO_NULL(CRMD_ORDERADM_I.NET_VALUE)).

 

When you then apply filters, the PU_SUM value will update according to the filters

3 replies

Forum|alt.badge.img+7

When you are filtering the option, it is not showing the sum only related to that dimension?


neil.whita
Level 4
  • Level 4
  • Answer
  • May 19, 2022

Hi Alex,

 

I think you want to use FILTER_TO_NULL here but I believe it's quite intensive and can affect query performance.

 

So instead of PU_SUM(CASES,CRMD_ORDERADM_I.NET_VALUE)

 

you apply FILTER_TO_NULL around the column

 

So instead of PU_SUM(CASES,FILTER_TO_NULL(CRMD_ORDERADM_I.NET_VALUE)).

 

When you then apply filters, the PU_SUM value will update according to the filters


  • Author
  • Level 3
  • May 23, 2022

Hi Alex,

 

I think you want to use FILTER_TO_NULL here but I believe it's quite intensive and can affect query performance.

 

So instead of PU_SUM(CASES,CRMD_ORDERADM_I.NET_VALUE)

 

you apply FILTER_TO_NULL around the column

 

So instead of PU_SUM(CASES,FILTER_TO_NULL(CRMD_ORDERADM_I.NET_VALUE)).

 

When you then apply filters, the PU_SUM value will update according to the filters

Hello Neil,

 

thank you very much, works like a charm and the performance is still good!