Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Setanalysis in setanalysis

Hello

i have the following Problem:

This works:

Sum({<[sText iPState]={"Running"}>} Duration)

This doesn't:

Sum({<[sText iPState]={"=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin)"}>} Duration)

This alone Returns "Runing":

=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin)

I think sth is wrong with my Syntax..

Cheers Michael

Tags (1)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Setanalysis in setanalysis

The expression search should return a boolean value per your field dimension (per value of [sText iPState])

If you expect a 'Running' that won't be evaluated to TRUE, so no value of [sText iPState] will be part of  the selection for the aggregation.

Not sure what you want to achieve maybe

Sum({<[sText iPState]={'$(=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin))'}>} Duration)

1 Reply
swuehl
Not applicable

Re: Setanalysis in setanalysis

The expression search should return a boolean value per your field dimension (per value of [sText iPState])

If you expect a 'Running' that won't be evaluated to TRUE, so no value of [sText iPState] will be part of  the selection for the aggregation.

Not sure what you want to achieve maybe

Sum({<[sText iPState]={'$(=FirstSortedValue({<Maschinen_Nr_MACSTA={A18}>} [sText iPState], -tBegin))'}>} Duration)