Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Error message: Error in set modifier expression

Hello All,

I created an expression for a variable but unfortunately it is not working:

Interval(Sum({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},{<NextState={'96'}>}DurationPre/Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},{<NextState={'96'}>}DurationPre)),'hh:mm:ss')

Error message: Error in set modifier expression

Any idea why?

Thanks

1 Solution

Accepted Solutions
Highlighted

Hi,

Try

Interval(Sum({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},NextState={'96'}>}DurationPre) / Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},NextState={'96'}>}DurationPre)),'hh:mm:ss')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

7 Replies
Highlighted
Specialist
Specialist

=Interval((Sum({<Date={">=$(=Date(Max(Date)))<=$(=Date(Max(Date)))"},{<NextState={'96'}>}DurationPre)/Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},{<NextState={'96'}>}DurationPre)),'hh:mm:ss')

try this

You didn't closed the first set analysis expression

Highlighted
Not applicable

No luck.same error message 😞

Highlighted
Specialist
Specialist

will you able to post the sample app?

Highlighted

Hi,

Try

Interval(Sum({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},NextState={'96'}>}DurationPre) / Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},NextState={'96'}>}DurationPre)),'hh:mm:ss')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

Highlighted
Specialist
Specialist

=Interval((Sum({<Date={">=$(=Date(Max(Date)))<=$(=Date(Max(Date)))"},NextState={'96'}>}DurationPre)/Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},NextState={'96'}>}DurationPre)),'hh:mm:ss')

Highlighted
Not applicable

Hi Max,

It works fine now 🙂

Thanks,

Hasvine

Highlighted
MVP
MVP

Couple of issues noticed highlighted in red.

Interval(Sum({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},{<NextState={96}>}DurationPre)/Count({<Date={'>=$(=Date(Max(Date)))<=$(=Date(Max(Date)))'},{<NextState={'96'}>}DurationPre)),'hh:mm:ss')

A date can't be '>=' and '<=' of a date (you used max(date)), It should ideally be some earlier date for '>=' comparison. May be like:

Addmonths(Max(Date),-1). You could share your sample qvw to get it corrected.