Aug 27 2023 04:37 AM
Hello Dear Community,
Hope everyone is doing fine. I have shared an Excel sheet with data that I want to analyze. I want to know the details in the following format.
Area indicator no. of 5s no. of 4s no. of 3s no. of 2s no. of 1s
Badin Food was good 12 3 2 4 3
Can this obtained by one formula? i need that.
Aug 27 2023 04:53 AM
See the attached version. It contains both a pivot table and a formula solution.
Aug 27 2023 07:11 AM
Few more variants with help of Power Query
Aug 27 2023 03:10 PM
I do so detest the nested array limitation of Excel. The desired result almost always is an array of arrays and this makes it so difficult to output the entire results using a single dynamic formula. I do not want to always be searching for the least-worst workaround (in this case using MAKEARRAY)!
= LET(
distinctAreas, UNIQUE(Table1[Area]),
indicatorHeadings, DROP(Table1[#Headers], , 1),
indicatorResults, DROP(Table1, , 1),
areaAttribute, TOCOL(IF(ISTEXT(indicatorHeadings), distinctAreas)),
indicatorAttr, TOCOL(IF(ISTEXT(distinctAreas), indicatorHeadings)),
countAreaIndicator, COUNTA(distinctAreas) * COUNTA(indicatorHeadings),
resultCounts, MAKEARRAY(countAreaIndicator, 5,
LAMBDA(r,c,
LET(
indicatorResults, INDEX(indicatorResults, 0, 1 + MOD(r - 1, 11)),
COUNTIFS(Table1[Area], INDEX(areaAttribute, r), indicatorResults, 6-c)
)
)
),
HSTACK(areaAttribute, indicatorAttr, resultCounts)
)
Aug 29 2023 03:13 AM
Aug 29 2023 03:13 AM
Aug 29 2023 03:14 AM