Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As beginner I am little confused with nested expressions:
I have to Count Sequenzes starting from a certain record.depending on a product line.
FirstSortedValue({<Linie={31}>}jRec,mRec) finds my correct record Number -> 1056
Count({<jRec={">1056"},Linie={31}>}jSEQN) finds my correct quantity of Sequenzes ........ but how can I combine both in one command. If I replace "1056" with the FirstSortedValue command I got an error.I experimented with brackets .... but no idea.
Many thanks for a hint
A couple approaches. Hopefully I have the right syntax for both. I tend to prefer like this, but I'm not very confident it will work here:
Count({<jRec={"=jRec>FirstSortedValue({<Linie={31}>}jRec,mRec)"},Linie={31}>}jSEQN)
But I believe the below is probably a more common approach, and I'm a bit more confident in it. It's also closer to what you were saying about experimenting with brackets. The brackets are just $(=...), which is dollar sign expansion. QlikView will evaluate what's in the $(=...) before it does anything else, and what's in there is your first expression, so it should come up with your first result of 1056. Then the results are literally inserted into the rest of the expression, which turns it into your second expression, and only then is the count evaluated. Since it is by then exactly the expression that was already working, it should return the same thing.
Count({<jRec={">$(=FirstSortedValue({<Linie={31}>}jRec,mRec))"},Linie={31}>}jSEQN)
A couple approaches. Hopefully I have the right syntax for both. I tend to prefer like this, but I'm not very confident it will work here:
Count({<jRec={"=jRec>FirstSortedValue({<Linie={31}>}jRec,mRec)"},Linie={31}>}jSEQN)
But I believe the below is probably a more common approach, and I'm a bit more confident in it. It's also closer to what you were saying about experimenting with brackets. The brackets are just $(=...), which is dollar sign expansion. QlikView will evaluate what's in the $(=...) before it does anything else, and what's in there is your first expression, so it should come up with your first result of 1056. Then the results are literally inserted into the rest of the expression, which turns it into your second expression, and only then is the count evaluated. Since it is by then exactly the expression that was already working, it should return the same thing.
Count({<jRec={">$(=FirstSortedValue({<Linie={31}>}jRec,mRec))"},Linie={31}>}jSEQN)
Second one works perfect! Many thanks!