Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jamiemcc
Contributor III
Contributor III

Count Of Records on Max Date

Hi Guys,

 

Im trying to get a count on Everyone who has done tasks on the Max Date Which is yetserday.

Both Codes Below Bring back everything in 2019 up until now.

I need Just Yesterday the Max Date Count

 

Option 1: Variable

Count({<Day={"<$(vMaxAbsoluteDate)"},Year = {2019},Source= {'Tasks'}>} distinct LOGIN)

 

Option2
Count({<Date={"=(=Max(Date))"},Source= {'Tasks'}>} distinct LOGIN)

What am i missing?

Labels (1)
1 Solution

Accepted Solutions
jamiemcc
Contributor III
Contributor III
Author

Hi Climber,

 

Thanks for the TIP i finally got it, I was Using the Wrong Date Field - Such an easy Mistake .

 

Count({$< FinishDay = {"$(=Max(FinishDay))"},Source = {'Tasks'} >}Distinct LOGIN)

Thanks for your help.

Jamie

View solution in original post

4 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Jamie,

Try this:

Count( Distinct {$< Date={"=$(=Max(Date))"}, Source = {'Tasks'}>}LOGIN)

For this one, you forgot the $ in the set analysis for the Max. This is needed to execute the statement.

Jordy

Climber 

Work smarter, not harder
jamiemcc
Contributor III
Contributor III
Author

Hi Climber,

 

Thanks for this, Still Only Receiving records for 2019.

Very Strange - I have Tried a few different Ways already and keep Coming up with Max Year Records and Not Max Date Records. It looks like Its selecting all of 2019 up until Max Day , I just need Yesterday and Nothing Previous. 

 

Thanking you in advance

 

Jamie

JordyWegman
Partner - Master
Partner - Master

Hi Jamie,

To see what is happening, do the following:

  1. Create a table
  2. Dimension: Date
  3. Measure: Count(Login)
  4. Measure: Count({$< Date = {"$(=Max(Date))"} >} Login)

Then you can see what the impact is of your set analysis. You should only see records on your max date.

Afterwards you can add also tasks.

Jordy

Climber

Work smarter, not harder
jamiemcc
Contributor III
Contributor III
Author

Hi Climber,

 

Thanks for the TIP i finally got it, I was Using the Wrong Date Field - Such an easy Mistake .

 

Count({$< FinishDay = {"$(=Max(FinishDay))"},Source = {'Tasks'} >}Distinct LOGIN)

Thanks for your help.

Jamie