Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Sai78
Contributor III
Contributor III

Expression in chart - MAX record between dates with multiple conditions

I have requirements to display the max record when multiple conditions satisfy in the chart based on date selections..the main identifier has multiple records, so If I run the chart by selecting all the available dates it works fine as my date set to have a rank column which already calculated record how many times appears   .. however if using the below expression and running this on the limited time frame I'm missing the records.

So my requirements here is whatever the time frame I selected I need the recent record at that time ... 

=Count(distinct if( [Type]='test' and Status='Complete'  and match(Type2, 'first',second')and rank=1 and DateType ='CreatedDate' and (Date>=DayName(vSDt) and Date<=DayName(vEDt)) , Key))

Any help would be greatly appreciated .. Thanks in advance.

 
 

 

1 Reply
Brett_Bleess
Former Employee
Former Employee

Believe this is going to likely require some set analysis too, so providing a few links that I hope may be of some help:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Sorry I am not more help, this will kick things back up as well, and someone else may offer up something else, but one thing that would definitely help on this one is a sample QVW so folks can see things in more detail...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.