Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help in date script

Hi

I would like to count on rows (SeriesUID) by the following conditions:

(today date - validated date(column1))>7 and column2 is null

This is my script:

count({$<today.date-[Validated.autoCalendar.Date]>{7}>}SeriesUID) and

count({$<Truther1={null}>}SeriesUID)

I got an error in: set modifier expression

I will be glad for help in the script.

Thanks.

Max

20 Replies
sunny_talwar

Did you try my suggestion Max?

sunny_talwar

Is today.date a field or is that just a place holder to say that I want Today's date here? May be this

Count({$<SeriesUID = {"=Today() - [Validated.autoCalendar.Date] > 7"}>}SeriesUID)

Not applicable
Author

todaydate is place holder to say that I want Today's date.

"Validated" is a column with a date that i want to minus from today.


Yes i tried the suggestion, the expression ok but when i check it with data its not the numbers.

If you have more ideas, i will be glad.

Thank you Sunny.

sunny_talwar

This isn't working still?

Count({$<SeriesUID = {"=Today() - [Validated.autoCalendar.Date] > 7"}>}SeriesUID)

Not applicable
Author

No i got wrong numbers.

sunny_talwar

Would you be able to share a sample?

Not applicable
Author

I think the first expression now is right but when i checking the second, i got wrong values.

Here is full expression:

Count({$<Validated = {"= now() - [Validated.autoCalendar.Date] > 7"}>}SeriesUID)

AND

Count({$<Truther1 = {"=Len(Trim(Truther1)) = 0"}>}SeriesUID)

sunny_talwar

May be try this

Count(If(Len(Trim(Truther1)) = 0, SeriesUID))

Not applicable
Author

Seems like a good solution.

When i connect the 2 conditions together, i got (-1). By counting i cant get (-1) .

Have any idea?

Thank you!

sunny_talwar

Try this:

Count({$<Validated = {"= now() - [Validated.autoCalendar.Date] > 7"}>} If(Len(Trim(Truther1)) = 0, SeriesUID))