filmov
tv
GROUPBY Function with TOP N Results with Multiple Columns with Different Calculations in Excel 365
Показать описание
Tutorial Advanced! GROUPBY Function with TOP N Results with Multiple Aggregations (Multiple Columns with Different Calculations) in Excel 365 | Example: Average is required for Quantity Column and SUM is required for Revenue Column!
GROUPBY:
=TAKE(SORT(
GROUPBY(Data[[#All],[Category]],
Data[[#All],[Quantity]:[Revenue]],
HSTACK(AVERAGE,SUM),,0),3,-1),C4+2)
PIVOTBY:
=TAKE(SORT(
PIVOTBY(Data[[#All],[Category]],,
Data[[#All],[Quantity]:[Revenue]],
HSTACK(AVERAGE,SUM),,0),3,-1),C4+2)
GROUPBY:
=TAKE(SORT(
GROUPBY(Data[[#All],[Category]],
Data[[#All],[Quantity]:[Revenue]],
HSTACK(AVERAGE,SUM),,0),3,-1),C4+2)
PIVOTBY:
=TAKE(SORT(
PIVOTBY(Data[[#All],[Category]],,
Data[[#All],[Quantity]:[Revenue]],
HSTACK(AVERAGE,SUM),,0),3,-1),C4+2)