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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Most Frequent Intime and OutTime

Hi,

Please find the attached QVW.

I have a field with Most Frequent time and Most Frequent Out time.

Based on the frequency of Most Frequent time/Most Frequent Out time,

If frequency is more then it has to display that.

It is clearly explained in QVW.

Regards,

Keerthi KS

Labels (1)
17 Replies
Clever_Anjos
Support
Support

But which one? Anyone?

Not applicable
Author

The highest one means MostFrequentIntime is more.

Clever_Anjos
Support
Support

Try this:

=FirstSortedValue(distinct

  MostFrequentInTime,

  Aggr(-count(MostFrequentInTime),EmpBasicInfoID,MostFrequentInTime )

)

Not applicable
Author

Some Errors in the expression

Clever_Anjos
Support
Support

Don´t worry tt shows as errors, but evaluates, maybe a bug

Capturar.PNG

Not applicable
Author

Thanks a lot Clever. Its working

Clever_Anjos
Support
Support

I think a better solution would be

=alt(Mode(MostFrequentInTime), // Try mode first, and then FirstSortedValue if Mode() returns null

FirstSortedValue(distinct

  MostFrequentInTime,

  Aggr(-count(MostFrequentInTime),EmpBasicInfoID,MostFrequentInTime )

))

MK_QSL
MVP
MVP

When you are using Distinct/NoDistinct with FirstSortedValue, it will show you red lines.. Which is bug !