# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
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

## Re: Error message: Error in set modifier expression

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.
7 Replies
Valued Contributor

## Re: Error message: Error in set modifier expression

=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

Not applicable

## Re: Error message: Error in set modifier expression

No luck.same error message :-(

Valued Contributor

## Re: Error message: Error in set modifier expression

will you able to post the sample app?

## Re: Error message: Error in set modifier expression

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.
Valued Contributor

## Re: Error message: Error in set modifier expression

=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

## Re: Error message: Error in set modifier expression

Hi Max,

It works fine now :-)

Thanks,

Hasvine

MVP

## Re: Error message: Error in set modifier expression

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: