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
Anonymous
Not applicable
Author

Try this in expression

if(today date - validated date(column1))>7,Count(SeriesID),Count({<Turther1={ }>}SeriesUID)).

Not applicable
Author

Got errors for brackets.

The expression: Count({<Turther1={ }>}SeriesUID)) refers to else from the if function in the beggining.

I need to count seriesID for 2 conditions together (AND): the first is the time between today and validated date,  the second is not null.

Thanks for the help.

sunny_talwar

Both the conditions are needed for a single expression or do you need two expressions?

Anonymous
Not applicable
Author

Try This

Count({<Date(TodayDate-ValidatedDate)>7>}SeriesID)

Not applicable
Author

It can be single or 2 expressions.

sunny_talwar

May be this:

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

and

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

or this:

Count({$<SeriesUID = {"=today.date-[Validated.autoCalendar.Date] > 7 and Len(Trim(Truther1)) = 0"}>}SeriesUID)

Anonymous
Not applicable
Author

Count({<TodayDate-ValidatedDate={'>7'} >}SeriesId) + Count({<Turther1={ }>}SeriesID)

Not applicable
Author

Still got modifier error.

Not applicable
Author

Thanks Sunny, seems the expression is ok but the numbers i got on this KPI is 0 (it shouldnt be). The expression that give me 0 is the first:

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


Have any idea?


Thank you.