Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cdao
New Contributor

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
Honored Contributor II

Re: Qlik Expressions

Can you give a try on the below:

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

 

cdao
New Contributor

Re: Qlik Expressions

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

trdandamudi
Honored Contributor II

Re: Qlik Expressions

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

cdao
New Contributor

Re: Qlik Expressions

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
Honored Contributor II

Re: Qlik Expressions

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

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

cdao
New Contributor

Re: Qlik Expressions

Thanks! That worked perfectly

trdandamudi
Honored Contributor II

Re: Qlik Expressions

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.