문제

Mode function in QlikView will return the mode element in array, only if there is only one. If there is more than one it returns null.

I need to return list of Modes in someway in a expression.

How can I return the list of modes in a multimodal set like:

1 3 3 5 5 7 9

I would to return 3, 5. So I can take Min, or Max, or Avg..

도움이 되었습니까?

해결책

I just needed to read up on Multimodals, so correct me if I'm wrong. This expression returns the highest of the two values that has the highest number of occurances (right?):

Max( 
 Aggr ( 
  if (count( Num)>=Max(total Aggr(count( Num),Num)) ,Num),
  Num)
)

I use the Aggr function to create the list to pick from. So change the first Max to whatever you want to pick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top