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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Version in a Table/Chart

I have the following situation that I can't get to work.  Any help would be much appreciated. 

So we have 2 tables, the first looks like this

Delta Table

Delta Key     Create Date     Closed Date     Status

The 2nd looks like this

Version History

Delta Key     Version     Team     Owner     Update Date

I have data on the Delta Table that looks like this

Delta Key     CreateDate             Closed Date             Status

1                    10/1/2013                                                 Open

Version History looks like this:

Delta Key     Version         Team                  Owner               Update Dt

1                      1                      Finance         Jim                  10/1/2013

1                      2                      Finance         Joe                  10/2/2013

1                      3                      Finance         Tony               10/3/2013

1                      4                      Accounting  Steve             10/4/2013

 

Lastly, I just want to create a simple little chart that
counts open items as of today by a drill group of Team(Team is the only
dimension)

 

So I’d simply expect to see

Team             Count           

Accounting      1

Instead I keep getting

 

Team             Count           

Accounting      1

Finance              1

 

My expression looks like this at the moment. I’m thinking I
need to do something with aggr and perhaps firstsortedvalue to get to the right
version, but everything I’ve tried hasn’t worked.  Any thoughts?

Count({<[Creation Date
Num]
={"<=$(vToday)"},[Closed Date
Num]

= {
">=$(vToday))"}+{0}

>}
[Creation
Date]
)


//,
[Version Num] ={"=sum(aggr(max([Max Version Num]),[Delta Key]))"}

//Count({<[Creation
Date Num]={"<=$(vToday)>$(vToday1)"},[Closed Date Num] =
{">=$(vToday))"}+{0} >}[Creation Date])



//=max([Version
Num])

//FirstSortedValue([PI Owner],-[Version Num])

//FirstSortedValue([PI Team],-[Version Num])

//FirstSortedValue(RAG,-[Version Num])

//[PI
Owner] = {"=FirstSortedValue([PI Owner],-[Version Num])"}, [PI Team]
= {"=FirstSortedValue([PI Team],-[Version Num])"},

//RAG = {"=FirstSortedValue(RAG,-[Version Num])"}

3 Replies
Not applicable
Author

when you put count(creation date).. you will get 1 since there is only 1 date.

What is the count you want to get for a team?

Not applicable
Author

thanks for the response.

I Should only get a count of 1 for accounting as the max(latest) version < today is version 4 which has a team of accounting. I should not be getting anything for Finance.

Instead, I am getting a count of 1 for both finance and accounting.

Let me know if you have any ideas.

Not applicable
Author

try this:

put team in dimension, under expression, put his:

COUNT(If(Aggr(<CONDITION>, TEAM) = <RESULT>,CREATE DATE))