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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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

17 Replies
Clever_Anjos
Employee
Employee

But which one? Anyone?

Not applicable
Author

The highest one means MostFrequentIntime is more.

Clever_Anjos
Employee
Employee

Try this:

=FirstSortedValue(distinct

  MostFrequentInTime,

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

)

Not applicable
Author

Some Errors in the expression

Clever_Anjos
Employee
Employee

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

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 !