Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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 (3)
11 Replies
Highlighted

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))

View solution in original post

Highlighted
Partner
Partner

Hi Sunny,

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

 

Regrads,

Mohan.