# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
cancel
Showing results for
Did you mean:
Not applicable

## set analysis count field =today()-30

I am trying to find out how many "open" tickets there were 30 days ago from todays date based on "date_opened," I am receiving an error with the below set analysis, I think it has to do with the "today-30" section, I've also tried today()-30.

Any help is much appreciated.

count({<date_opened={"today-30"}>}case_number)

1 Solution

Accepted Solutions
MVP

May be this

Count({<date_opened={"\$(=Date(Today() - 30))"}>}case_number)

9 Replies
MVP

May be this

Count({<date_opened={"\$(=Date(Today() - 30))"}>}case_number)

Partner

Can you share a sample app? To directly test on it?

It would be much quicker and more efficient

Count({<date_opened={"\$(=Date(max(date_opened) - 30))"}>}case_number)

Specialist II

try

=count({<date_opened={'\$(=today()-30)'}>}case_number)

Not applicable
Author

Hi Omar, Please see the attached file.

I was wanting to add a second measure to the KPI on the left, "count of remaining open tickets" which would measure the count of how many tickets were open 30 days from today().

MVP

Are you hoping to see 1,265 as the required number? May be this

Count(distinct{<case_number={'=Len(Trim(date_closed))=0'}, date_opened={"\$(='>' & Date(Today() - 30, 'M/D/YYYY'))"}>}case_number)

Not applicable
Author

Hi Sunny, I don't want to consider the closed_date for this portion of the analysis.

MVP

May be this then

Count(distinct{<date_opened={"\$(='>' & Date(Today() - 30, 'M/D/YYYY'))"}>}case_number)

Contributor II

Monica, the comment above by Sunny did not work?
Count({<[date_opened]={"\$(=Date(Today()-30))"}>}[case_number])