Hope everyone is safe and well.
I am attempting to count the amount of times a specific Value appears within a column (multiple Values can be selected for each row), however, the data stored within the cells seems to be a link to another SharePoint table. When I try to filter for a particular Value within the column, I receive an Incompatible Type Error (Table, Text). Is there a method to overcome this?
Since the SharePoint tables belong to the company I work for, I am unable to share proper screenshots but attached is what the data looks like when displayed using a Data Table.
Thank you so much.
Solved! Go to Solution.
Hi @nep22 ,
I am not sure whether myself or @BCLS776 are on the right track here (his is the correct solution for a nested Table), but I suspect what you are showing in the example Data Table is a Multi-Choice field. If so, you can filter this on the data source forming the table - so if the Data Table was showing the table MySPList and the field displayed was MySPField and you were looking for how many times MyValueFound appeared, it would be something like
CountRows(
Filter(
MySPList,
"MyValueFound" in MySPField.Value
)
)
You will get a Delegation warning on this - if your data table was filtered by
Filter(
MySPList,
MyStatusField = "Current"
)
and this resulted in under 2,000 records (and your delegation limit is set to this), you could do this in a Delegable fashion with
With(
{
wList:
Filter(
MySPList,
MyStatusField = "Current"
)
},
CountRows(
Filter(
wList,
"MyValueFound" in MySPField.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
How about something like?:
CountRows(
ForAll(myTable.Values As aRecord,
ForAll(aRecord.Values As aItem,
If(aItem = "SpecificValue", { Value: "Count one"})
)
)
)
You'll need to modify this code to suit your situation:
Hope that helps,
Bryan
Hi @nep22 ,
I am not sure whether myself or @BCLS776 are on the right track here (his is the correct solution for a nested Table), but I suspect what you are showing in the example Data Table is a Multi-Choice field. If so, you can filter this on the data source forming the table - so if the Data Table was showing the table MySPList and the field displayed was MySPField and you were looking for how many times MyValueFound appeared, it would be something like
CountRows(
Filter(
MySPList,
"MyValueFound" in MySPField.Value
)
)
You will get a Delegation warning on this - if your data table was filtered by
Filter(
MySPList,
MyStatusField = "Current"
)
and this resulted in under 2,000 records (and your delegation limit is set to this), you could do this in a Delegable fashion with
With(
{
wList:
Filter(
MySPList,
MyStatusField = "Current"
)
},
CountRows(
Filter(
wList,
"MyValueFound" in MySPField.Value
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thank you so much! This was in fact an example of a Multi-Choice field.
Thank you so much for your reply!
User | Count |
---|---|
156 | |
94 | |
82 | |
77 | |
58 |
User | Count |
---|---|
195 | |
175 | |
103 | |
96 | |
89 |