How to count the IDs with condition including AND and OR in Qlik Sense Desktop

92 Views Asked by At

I would like to count numbers of vehicle in stock by using two data columns "in_service" and "out_service".

If the vehicle is still in use at this point, then the "out_service" would be null. I want to count those still in service based on the data:

=Count( {< [in_service_date.autoCalendar.YearMonth]={"<=$(YRMON)"},[out_service_date.autoCalendar.YearMonth]={">=$(YRMON)"}|IsNull(out_service_date)> } >} [vin])

However, when I use the expression to edit my counts, there is always an error showing

error in expression Error in set modifier expression

Not sure how am I going to be able to make it right? I thought that is very straightforward.

I would expect that | operation would return the right count

0

There are 0 best solutions below