Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Dear community,
I would like to use aggregation on string values, comparable to other languages, e. g. SQL. Easy example of an Infotable:
myKey | stringValue |
1 | "mx" |
2 | "my" |
2 | "mz" |
Any chance I can use the Aggregate function (or anything else) to get
myKey | stringValue |
1 | "mx" |
2 | "my" |
with "my" as the first or minimum value?
Thank you
Benny
Solved! Go to Solution.
I would filter first on the String column and create a new 'grouping column' then do the aggregate with grouping
Maybe some combination of a Query/Filter and Sort or Distinct
Check the Infotable functions
Thanks for your reply @PaiChung .
I guess I broke my example down too much. I do have more columns which indeed need a sum aggregation. But if I cannot process the string column Aggregate is not useful for me. So here my extended example closer to reality:
myKey | numValue | stringValue |
1 | 4 | "mx" |
2 | 5 | "my" |
2 | 6 | "mz" |
Desired output:
myKey | numValue | stringValue |
1 | 4 | "mx" |
2 | 11 | "my" |
I have the feeling I need to iterate manually.
Thank you
Benny
I would filter first on the String column and create a new 'grouping column' then do the aggregate with grouping
Thank you @PaiChung ,
I haven't tested your approach but since there is no other suggestion I accept it as my solution.
Perhaps I will create an entry in the ideas section to support strings with the Aggregation.
Thank you
Benny