Infotable Aggregate with Strings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Infotable Aggregate with Strings
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.
- Labels:
-
Coding
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would filter first on the String column and create a new 'grouping column' then do the aggregate with grouping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe some combination of a Query/Filter and Sort or Distinct
Check the Infotable functions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would filter first on the String column and create a new 'grouping column' then do the aggregate with grouping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
