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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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)

View solution in original post

1 Reply
swuehl
MVP
MVP

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)