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

Qlik Expressions

I'm trying to figure out why this expression is creating an error:

Count({<monthid = max(monthid), initial_screening_completed -= {""}>} RIN)

 

specifically the monthid = max(monthid), I can set the monthid to a value, 201907

Count({<monthid = {201907}, initial_screening_completed -= {""}>} RIN) 

 

Which returns the correctly result but would like to set it to the max value. max(monthid) by itself returns the correct value.

7 Replies
trdandamudi
Master II
Master II

Can you give a try on the below:

Count({<monthid ={"=max(monthid)"}, initial_screening_completed -= {""}>} RIN)

 

cdao
Partner - Contributor II
Partner - Contributor II
Author

I tried it and it didn't include the filter, it just aggregated the total count sans monthid filter

trdandamudi
Master II
Master II

Can you please share sample data and the output that you are expecting ?

cdao
Partner - Contributor II
Partner - Contributor II
Author

Count({<monthid = max(monthid), initial_screening_completed -= {""}>} RIN)

Expected Result = 2

 

Sample Data:

monthidRINinitial_screening_completedcounted
2019071017/1/2019X
2019071027/1/2019X
201907103  
201906101  
201906102  
2019061046/1/2019 
2019051014/2/2019 
201905102  
2019051055/1/2019 
trdandamudi
Master II
Master II

Please use the below expression and you will get the result as 2:

=Count({<monthid ={"$(=Max(monthid))"}, initial_screening_completed -= {""}>} RIN)

cdao
Partner - Contributor II
Partner - Contributor II
Author

Thanks! That worked perfectly

trdandamudi
Master II
Master II

You are welcome... If you think you got the answer can you please close the thread by selecting as right answer, so that it will be useful for others also.