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: 
bkkuah17
Contributor II
Contributor II

How to Qlikview select filter max date on real time ?

Hi,

Anyone knows how to select maximum date by group ? I try to avoid pre-calculating it during load statement, because I want to keep it as interactive as possible. I would like to enable report to recalculate the new max date after user has apply new filtering selection...

Below is as far as I can figure out...

screenshot.jpg

Thanks

Steven

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Steven,

If(Aggr(NODISTINCT Max(B2B.ReqDate),B2B.APPREFNUM)=B2B.ReqDate,'Y','N')

View solution in original post

6 Replies
tamilarasu
Champion
Champion

Hi Steven,

If(Aggr(NODISTINCT Max(B2B.ReqDate),B2B.APPREFNUM)=B2B.ReqDate,'Y','N')

shiveshsingh
Master
Master

Hi Tamil

Can you please let me know why you put

NODISTINCT

tamilarasu
Champion
Champion

Hi Shivesh,

I'll take the above scenario as an example and try to explain.

Capture.PNG

Please note that 'NoDisitinct' can be used only in Aggr function. So here we have to find the max date for a particular Code (dimension) and it should be repeated for all the rows. But if you use Aggr function then Qlikview will create a virtual table like below

Capture.PNG

Qlikview only shows the date for the first row and rest of the rows as Null for the same code.

Capture.PNG

So we can use NoDistinct qualifier which helps us to replicate the max date for the same code (dimension).

Capture.PNG

Finally the output looks like below as per the above requirement.

Capture.PNG

You can read more about NoDistinct in the below thread.

Qlik Tips: No nodistinct

I hope I've explained myself well.

shiveshsingh
Master
Master

Thank you so much for detailed explanation.

Appreciate your efforts

tamilarasu
Champion
Champion

No Problem .

bkkuah17
Contributor II
Contributor II
Author

Thanks ! It works..