Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

7 Replies
qlikmsg4u
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

Not applicable
Author

No luck.same error message 😞

qlikmsg4u
Specialist
Specialist

will you able to post the sample app?

PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
qlikmsg4u
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')

Not applicable
Author

Hi Max,

It works fine now 🙂

Thanks,

Hasvine

tresesco
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.