Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
baliyan_vinay
Contributor III
Contributor III

Set Less Than Not working

Hi Experts,

I don't get what is wrong is wrong with this expression, the max(TS_STAT) aggregated for each TS_NO, if is greater than 3050 and less than 3200 then TS_NO should be counted.

 

 

=Count({<TS_NO={"=(Max(TS_STAT))>= 3050 < 3200"}, TS_DEL_MONTH= >} Distinct TS_NO)

 

 

 

TS_NOMONTHTS_DEL_MONTHTS_STAT
1499973Jan-2020Dec-20193300
1499973Dec-2019Nov-20193200
1499973
Nov-2019Oct-20193050
1499973
Oct-2019Sep-20192800

 

Logic: If I select Oct-2019 and Nov-2019, the max would be 3050 for the TS_NO, hence TS_NO should be counted, but if don't select anything, max would be 3300 and hence TS_NO should not be counted. 

Here if I remove less than 3200, then the TS_NO is counted.

Regards,

Vinay

@kaushiknsolanki 

Labels (1)
1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

=Count({<TS_NO={"=If(Max(TS_STAT)>= 3050 and Mac(TS_STAT)<3200,TS_NO)"}, TS_DEL_MONTH= >} Distinct TS_NO)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

1 Reply
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

=Count({<TS_NO={"=If(Max(TS_STAT)>= 3050 and Mac(TS_STAT)<3200,TS_NO)"}, TS_DEL_MONTH= >} Distinct TS_NO)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!