Why control filter work for table level but do not work on KPI level

I have created a parameter as filter1, made ‘All’ as static value, and using it as control filter. in control filter passed a list as ‘All’, ‘A’, ‘B’. Now created a calculated field that has been used as filter. this was calculated as

ifelse(
${filter1}= ‘All’, 1,
${filter1}= ‘A’ AND {num_logs_with_auth_percent} < 0.98, 1,
${filter1}= ‘B’ AND {num_logs_with_auth_percent} > 0.98, 1,
0
)

Now if I use as filter the filter is working on table level but is not working on KPI level.
here is a simple dataset to explain my problem and expected outcome-

and I have 2 KPI,
number_of dataset = distinct_count(dataset) &
num_log_with_authz_percent = sum(num_log_with_authz_percent)/ sum(num_log)

Now if I select A from filter it correctly keep 4 rows that from table that has percentage less than 98% , and I expect it reflect on KP level too, for examplle num_of_dataset shall be 2 and and num_log_with_authz_percent should be showing 99%, but it shows no change is KP level.

Now if I select B, in table it keeps all the records that has more than 98% percent which is right, but in KPI level it says ‘NO DATA FOUND’.

Not sure why this is happening?

Hi @sadhanm22
stupid question but is the filter linked to the KPI to?
BR

check KPIFilter
works for me. maybe a error in the caluclated field where you use the parameter?

Thank you for sending the arena link, it looks working on arena , but couldn’t figure out how this can be used.
here is screen shot of exactly how the field was calculated

Can you check if the filter values match the condition values?
Or start simple with All, A, B to avoid typos.

I did try it with A, B, to avoid typo mistake and produced same result, Again it is working on table level, is there is a typo mistake, it shall not be working on table level either, if I understand it correctly.

It seems it has something to do with ‘num_logs_with_authorizations_percentage’ being an aggregate column. For example (separate instances)

ifelse(
${filters} = ‘All’, 1,
${filters} = ‘Custodians without SEL logs’ AND isNull({num_logs}), 1,
0
)

this above condition works both on KPI level but if i use num_logs as agregate column

ifelse(
${filters} = ‘All’, 1,
${filters} = ‘Custodians without SEL logs’ AND isNull(sum{num_logs})), 1,
0
)

then it only works on table level and gives the same error message that no data found for KPI level.

Does it has something to do with how this filter is configured?

if I looked into your visuals (arena) then the aggregation is set to 'No Agreegation" but mine is set to custom, and can’t change it no Aggreegation

Hi @sadhanm22,

What does your calculation for num_logs_with_authorizations_percentage look like?

1 Like

Hi @David_Wong ,
Thank you , here is the calculation,

num_logs_with_authorizations_percentage=
sum({num_logs_with_authorizations})/sum({num_logs})

and it has been done in dataset level.

I have been able to make it working. Though not sure exactly why, however, it seems using aggregate value as filter do not work on KPI level. I have change the calculation for filter. ‘num_logs_with_authorizations_percentage’ has been used on as KPI and table value (SEE the calculation).

num_logs_with_authorizations_percentage=
sum({num_logs_with_authorizations})/sum({num_logs})

however when I created the calculated field for filter I do did not use aggregate value, I used non aggregate value. For example:

num_logs_authz_percent =

{num_logs_with_authorizations}/sum{num_logs}

and then num_logs_authz_percent has been used to create calculated field to create parameterised filter.

ifelse(
${filter1} = ‘All’,
1,
${filter1} = ‘Custodians with <98% SEL events w authorization details’ AND ${num_logs_authz_percent} < 0.98,
1,
${filter1} = ‘Custodians with >98% SEL events w authorization details’ AND ${num_logs_authz_percent} > 0.98,
1,
0
)

It worked in this case, but do not know the reasoning behind it.

1 Like

it actually did not work, I thought it was working realised it is not giving consistent values

1 Like

Hi @sadhanm22,
It’s been awhile since we last heard from you, are you still encountering issues or were you able to find a work around?
If still in need of assistance, what is still causing issues for you?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi,
This problem has been solved. the solution is here provided by @David_Wong and it worked exact same way I wanted.

2 Likes