# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

## using 'less or equal' condition in set analysis

Hello every one!

i'm using this set expression to calculate tasks with passed time of completion:

Count({\$<[Тип даты]={'*Срок выполнения задачи*'}, [1. День]={"\$(=Date(Today(), 'DD.MM.YYYY'))"},[Статус задачи]={0}>}DISTINCT [ID задачи])+ sum({\$<[Год]={"*"}>}0)

Highlighted part of expression must response to count only tasks, that have date of completion less than today. but this formula works only with "=" sign. if im using variants like [1. День]<{"\$(=Date(Today(), 'DD.MM.YYYY'))"}, or [1. День]={"\$(<Date(Today(), 'DD.MM.YYYY'))"}, calculation returns zero, and this is wrong.

So, what the problem?

1 Solution

Accepted Solutions
MVP

## Re: using 'less or equal' condition in set analysis

Try this:

Count({\$<[Тип даты]={'*Срок выполнения задачи*'}, [1. День]={"\$(='<' & Date(Today(), 'DD.MM.YYYY'))"},[Статус задачи]={0}>}DISTINCT [ID задачи])+ sum({\$<[Год]={"*"}>}0)

2 Replies
MVP

## Re: using 'less or equal' condition in set analysis

Try this:

Count({\$<[Тип даты]={'*Срок выполнения задачи*'}, [1. День]={"\$(='<' & Date(Today(), 'DD.MM.YYYY'))"},[Статус задачи]={0}>}DISTINCT [ID задачи])+ sum({\$<[Год]={"*"}>}0)

Contributor II

## Re: using 'less or equal' condition in set analysis

Mr. Sunny T, cool as always Your formula works. Thanks again.