Is there a way to use a column name in a sub table of a collection in the GroupBy function ?
My top level Collection looks like this
If I click on the fields table I get the following
I want to be able to be able to get all items assigned to a user but group them by a column in the subtable (i.e. the customfield_10014 column of fields).
I've tried this
GroupBy(Filter(jiraRawData, fields.assignee.displayName = varSelectedUser), "fields.customfield_10014", "grouped")
but get the following error
I'm all out of ideas. Any assistance much appreciated.
Solved! Go to Solution.
Hi @slong :
Firstly,let me explain why you encountered this problem.
it is not available to group a table by a column in the sub-table.
Secondly,I suggest you first use AddColumns to extract the values in the sub-records.Please try this solution:
I assume that the value of fields is a record and not a table:
1\My data source:
ClearCollect(
jiraRawData,
{
fields: {
assignee: {displayName: "bof"},
customfield_10014: "1"
}
},
{
fields: {
assignee: {displayName: "bof"},
customfield_10014: "2"
}
}
)
2\The Formula
GroupBy(
AddColumns(
Filter(jiraRawData, fields.assignee.displayName = varSelectedUser),
"NewCustomfield_10014",
fields.customfield_10014
)
"NewCustomfield_10014",
"grouped"
)
Best Regards,
Bof
Hi @slong :
Firstly,let me explain why you encountered this problem.
it is not available to group a table by a column in the sub-table.
Secondly,I suggest you first use AddColumns to extract the values in the sub-records.Please try this solution:
I assume that the value of fields is a record and not a table:
1\My data source:
ClearCollect(
jiraRawData,
{
fields: {
assignee: {displayName: "bof"},
customfield_10014: "1"
}
},
{
fields: {
assignee: {displayName: "bof"},
customfield_10014: "2"
}
}
)
2\The Formula
GroupBy(
AddColumns(
Filter(jiraRawData, fields.assignee.displayName = varSelectedUser),
"NewCustomfield_10014",
fields.customfield_10014
)
"NewCustomfield_10014",
"grouped"
)
Best Regards,
Bof
User | Count |
---|---|
251 | |
102 | |
94 | |
47 | |
37 |