Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table :
[Table]:
LOAD * INLINE [Dim,DimID
NameA, A
NameB, B
NameC, C
NameD, D];
This Table is put in a filter and so i can select values of [Dim] inside the filter. I want to know what is the first value i select so I use this expression: SubField(Concat([DimID], '|',', '),'|',1).
For example if I select in first 'NameB' and then second 'NameA' in the filter, i want my expression return B. The problem is that Concat() all time order value so i obtain A as the result. How can i do to stop Concat() to order values?
Thanks.
It's each time a new calculation against the current selection state and therefore concat() must re-order the included values.
To track the order in which dimensionn-values are selected you may use the appropriate set analysis feature within the identifier of {$1} respectively {$_1} to query the previous/following selection state - and then querying the n states against each other.
But if your scenario isn't a rather simple case it may become ugly with a lot of (nested) if-loops.
@Thathayoyo try below
=Only({<Dim = {"$(=trim(SubField(GetFieldSelections(Dim),',',-1)))"}>}DimID)
Hello thank but GetFieldSelections() also order automatically values so it does not works.
It's each time a new calculation against the current selection state and therefore concat() must re-order the included values.
To track the order in which dimensionn-values are selected you may use the appropriate set analysis feature within the identifier of {$1} respectively {$_1} to query the previous/following selection state - and then querying the n states against each other.
But if your scenario isn't a rather simple case it may become ugly with a lot of (nested) if-loops.