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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

Need a help in correcting the set analysis Expression

Hello All,

I am trying to write a set analysis expression to get  Bottom 5 values.

The data has three column, ID,Question,Value.

In a straight table in took 

Dimension:Question 

Expression:

aggr(avg({<ID={"=Rank(-avg(Value),4)<=5"}>}Value),Questions)

 

Output: By using above expression the out put is

Capture1.PNG

Which is Wrong ,Let say for Question :03 the Bottom 5 avg value has to be =0.60(0+0+1+1+1/5)

 

 

Capture.PNG

but i am getting 1.00(1+1+1+1+1/5) as output same with rest .

what i find out is my expression is ignoring zero value rows and considering only 1 and above values rows .

if i select a value from question let say 03 then i am getting required output which is 0.60 ,without selection i am not getting

Capture1.PNG

 

SO how to include zero value rows in my expression

PFA sample data

 

Thanks

 

 

 

because 

Labels (1)
10 Replies
sunny_talwar

Try this

Avg(Aggr(If(Rank(-Avg({<FY={$(=$(vFY))}>}Value), 4) <= 5, Only({<FY={$(=$(vFY))}>}Value)), Question, ID))