Hi everyone, I am using the “Nominal Value Row Filter” node to filter some months that are in YYYYMM (I guess) format, but in the left side of the node the string values are not sorted.
For instance if I sort the values in a ascending way the values should be like this:
I am attaching a workflow, just in case
Thanks in advance.
MauNominal Value Row Filter Sort.knwf (27.9 KB)
Why don’t you use regex selection? May I ask which values you want to include?
Thank you Armin, for your response. The matter is that I have to remove the oldest month 201608, but I prefer to have it sorted in the Nominal Value Row Filter node to avoid mistakes.
This is not a verbatim example of my current issue as I have almost 30 months and is quite difficult (at least visually) to identify the oldest month.
What I have to do is remove the oldest month then add the new month and then run a model every month, using a 30 month window.
So why don’t you just use a simple Row Filter node after the Sorter node?
You can exclude or include the first x rows by using the Row Filter node.
If you are not sure about the sorting (which works fine in your example) then you may prefer to convert the values to date format first using a String Manipulation node with this expression:
join(substr($PERIODSTRING$,0,4), "-", substr($PERIODSTRING$, 4, 2), "-01")
and then a String to Date&Time node to convert.
I have tested it a bit and seems that Nominal Value Row Filter/Splitter for some reason shows values in random order when first opened (for first available column in table). If you pick some other column from menu the order is then shown as in Table Creator node. When you again pick same (first) column order is also shown as in Table Creator node. So if you sort, then use Domain Calculator node and then in Nominal Value Row Filter node first pick some other column and then go back to your column of interest values should be just fine
I have add one more column so take a look.
Nominal Value Row Filter Sort.knwf (28.5 KB)
Hi, I’ve modified your workflow and uploaded it. I think this does what you want and completely automates it.Nominal Value Row Filter Sort2.knwf (22.0 KB)
Oh…just a bit more. The variable created out of the Stats node is the Minimum of your numeric values. This is then plugged into the normal row filter.
In your case I would only use GroupBy instead Statistics node to get minimum value as it performs much faster
@ipazin, yes that would work but I think the difference in execution time where 31 numbers are involved is not going to be earth shattering
For 31 for sure it is not going to be
Thank you I had the answer in front of me, I will check that out
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.