Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DWolsie
Contributor III
Contributor III

Filter out a value in KPI

Hello everyone,

I previously had coded into the data editor the following: and not match(KOSTL, '0017001020')

I now want to remove this, and apply it to a KPI field, where I take the sum of the total budget.

I have already tried the following: =sum({$-<KOSTL={'0017001020'}>} Budget) but this gives me a not-specified error in the code:

DWolsie_0-1728983101692.png

If at all relevant, the COSP budget is a master-element.

 

Thanks in advance!

Labels (1)
1 Solution

Accepted Solutions
mpc
Partner Ambassador
Partner Ambassador

It's not a field, but a Master Measure, that's why it's in purple. Nested aggregation (Sum in sum for exemple) are not allowed and then an error is triggered 

So you can try:

{<KOSTL-={'0017001020'}>} [COSP Budget]

From Next Decision and mpc with love

View solution in original post

9 Replies
mpc
Partner Ambassador
Partner Ambassador

Hi, 

Can you try this instead: sum({<KOSTL-={'0017001020'}>} Budget) ? 

Regards

From Next Decision and mpc with love
DWolsie
Contributor III
Contributor III
Author

It still says error in formula 😕

mpc
Partner Ambassador
Partner Ambassador

COSP Budget field seems missing, that's why it's green colored. Can you check the field name ? 

From Next Decision and mpc with love
DWolsie
Contributor III
Contributor III
Author

Weird... it even recommends it as a field to take

DWolsie_0-1728984355855.png

 

mpc
Partner Ambassador
Partner Ambassador

It's not a field, but a Master Measure, that's why it's in purple. Nested aggregation (Sum in sum for exemple) are not allowed and then an error is triggered 

So you can try:

{<KOSTL-={'0017001020'}>} [COSP Budget]

From Next Decision and mpc with love
DWolsie
Contributor III
Contributor III
Author

Thanks for the info. It accepts it as a formula, though weirdly enough it seems to now not have filtered it out. If I take out the '-' it is also still the same value. Any idea what could cause this, or is that not possible to find out without a deeper dive into the data and data editor?

mpc
Partner Ambassador
Partner Ambassador

Ok, indeed you need to go deeper yes. First step is to obtains the formula behind [COSP Budget] Master Measure, because maybe some filters are already applied. 

From Next Decision and mpc with love
DWolsie
Contributor III
Contributor III
Author

Thanks, I can't find any filters that should change it, since it itself is an addition of other master elements, none of which have filters that I believe you influence the ability to filter for this variable.

Thank you very much for your help regardless! Is it customary to accept your previous answer as a solution, since it at least got rid of the error message, or should I leave it untouched?

mpc
Partner Ambassador
Partner Ambassador

You're welcome, I hope you'll find out the problem. 
I think you can mark it as a solution, so Qlik users with similar issue will have a solution which can apply to them. 

From Next Decision and mpc with love