Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
muraliqlik
Contributor II
Contributor II

Qlikview Maximum dates comparison

Hi Team,

below is the sample data for my requirement.

TitleVersionDate
abc112/1/2018
abc212/2/2018
abc312/5/2018
abc412/7/2018
abc512/12/2018
def11/1/2018
def25/5/2018
def37/7/2018
def47/7/2018

 

I want to show only Titles whose final version Date and final minus one version Dates are not matching . for the above sample data my chart should like below. it should show only 'abc ' Title details as the dates are not matching for final version and final minus one version.

TitleVersionDate
abc412/7/2018
abc512/12/2018

 

Thanks

Murali

2 Solutions

Accepted Solutions
sunny_talwar

Try this expression

=If(Version >= Max(TOTAL <Title> Version, 2), Only({<Title = {"=FirstSortedValue(Date, -Version) <> FirstSortedValue(Date, -Version, 2)"}>}Date))

image.png

View solution in original post

sunny_talwar

May be add a check for null as well

=If(Version >= Max(TOTAL <Title> Version, 2), Only({<Title = {"=FirstSortedValue(Date, -Version) <> FirstSortedValue(Date, -Version, 2) and Len(Trim(FirstSortedValue(Date, -Version))) > 0"}>}Date))

View solution in original post

3 Replies
sunny_talwar

Try this expression

=If(Version >= Max(TOTAL <Title> Version, 2), Only({<Title = {"=FirstSortedValue(Date, -Version) <> FirstSortedValue(Date, -Version, 2)"}>}Date))

image.png

muraliqlik
Contributor II
Contributor II
Author

Thank you so much Sunny . It is working perfectly except on one scenario.
if the either final version date or final minus one version date is null , in this scenario we shouldn't see the title.
I tried null handling by tweaking your expression, It is not working for me , could you please help
sunny_talwar

May be add a check for null as well

=If(Version >= Max(TOTAL <Title> Version, 2), Only({<Title = {"=FirstSortedValue(Date, -Version) <> FirstSortedValue(Date, -Version, 2) and Len(Trim(FirstSortedValue(Date, -Version))) > 0"}>}Date))