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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan_1105
Partner - Creator III
Partner - Creator III

How to nullify a field in aggr function

Hi Qliker,

 

Nullification isn't working in my expression. The output of the expression is working as expected but I need to nullify a field.

Following is my expression:

sum({<Header=>}

Aggr(


if("Green_Ind" = '≤' and [Scored? (Y/N)]='Y' and sum({<Header=>}Deno) <> '0',
if(sum({<Header=>}Numerator)/sum({<Header=>}Deno/Divisor) <= avg({<Header=>}"Green"),1),


if("Green_Ind" = '≥' and [Scored? (Y/N)]='Y' and sum({<Header=>}Deno) <> '0',
if(sum({<Header=>}Numerator)/sum({<Header=>}Deno/Divisor) >= avg({<Header=>}"Green"),1)))

 

,Header,[Measure Title],KPI))

 

A doubt, can I nullify the field which is been used to aggregate the data?

 

Regards,

Mohan

Labels (1)
11 Replies
sunny_talwar

So, all you want is to ignore selection in Header field? Try this

count({<Header=>}
Aggr(

if(only({<Header=>}"Green_Ind") = '≤' and only({<Header=>}[Scored? (Y/N)])='Y' and sum({<Header=>}Deno) <> '0',
if(sum({<Header=>}Numerator)/sum({<Header=>}Deno) <= avg({<Header=>}"Green"), Only({<Header>}[Measure Title])),

if(only({<Header=>}"Green_Ind") = '≥' and only({<Header=>}[Scored? (Y/N)])='Y' and sum({<Header=>}Deno) <> '0',
if(sum({<Header=>}Numerator)/sum({<Header=>}Deno) >= avg({<Header=>}"Green"),Only({<Header>}[Measure Title]))))
 
,Header,[Measure Title],KPI))
mohan_1105
Partner - Creator III
Partner - Creator III
Author

Hi Sunny,

Code work like a champ... Thanks, ton..!

 

Regrads,

Mohan.