Ravindra BagaleCourses & study guides मराठी Track your progress

9. Dynamic Arrays

Excel

9.11 PIVOTBY, and PIVOTBY vs PivotTable

Show one summary across rows and columns

Ravina is preparing a workshop report for two fictional grocery stores inspired by Blinkit and Amazon Now. The practice names are FreshGo and MarketRush. In the previous lesson, her city report gave one amount for Pune. Now the manager wants to see how much each store contributed to Pune, and compare both stores across cities. Putting platform names across the top makes those questions easy to read.

A cross-tabulation, or cross-tab, groups records along two directions. The left side contains one group field such as City. The top contains another, such as Platform. At each intersection the report calculates something for records that satisfy both. The number at Pune and FreshGo is the amount for orders from Pune and from FreshGo together. Neither the other store's Pune amounts nor other FreshGo cities belong in that cell.

PIVOTBY builds that rectangle as a worksheet formula. A PivotTable produces a similar style of report through a dedicated workbook object. The two use different controls. You will build both from the same fictional records and check the same intersections before deciding how to present them.

Map the formula inputs to the report layout

For this chapter the three source fields contain one value per order. Row labels come from City, column labels from Platform and the numeric measure from Amount. Align the three fields by original record. Multiplying that idea by ten rows gives a short formula and a readable summary. If the arrays are shifted, Excel may combine a city from one order with the amount from another.

Use the first four arguments for the source roles. The remaining settings govern the output and its included records.
ArgumentExampleMeaning
row_fieldsC2:C11City groups down the left side
col_fieldsD2:D11Platform groups across the top
valuesG2:G11One order amount per aligned row
functionSUMAdd amounts in each intersection
field_headers0Input arrays start with data
row_total_depth and row_sort_order1 and 1Grand total row and ascending city labels
col_total_depth and col_sort_order1 and 1Grand total column and ascending platform labels
filter_arrayStatus equals DeliveredDecide which source records enter the report
relative_to1With PERCENTOF, compare with the row total

Field header settings describe whether your input arrays include source heading cells. With settings of 0, the text values FreshGo and MarketRush still supply column categories. They are familiar names taken from source records. Those categories are distinct from field labels such as Platform or Amount provided at the top of the original data.

In a one-level report, use total depth 0 on an axis to hide its grand total or 1 to keep it, and −1 to put it at the beginning. Row and column settings can be different. With multiple fields on an axis you can include supported subtotal levels. Decide ahead of time which totals consumers need. If totals are included for readability, exclude them from any later sum of the detail cells.

Microsoft marks PIVOTBY as Microsoft 365 in its feature catalogue. The broad applicability line on the individual function article names other Excel editions too. Check whether the target installation can actually calculate a short PIVOTBY before relying on it. The second lab uses a PivotTable for comparison and provides a route to the same numeric answers if the formula is unavailable.

Enter the workshop records once

Use a blank Orders tab with the source starting in A1. The row descriptions use real date values in column B and numeric Qty, Amount and Minutes. The two reports should reference this same ten-row fixture. FreshGo and MarketRush are practice merchant labels. All figures are fictional.

Orders A1:I11. Column C is City, G is Amount, and I is Status.
Order IDDateCityPlatformCategoryQtyAmountMinutesStatus
BLK-10012 Nov 2026PuneFreshGoDairy2649Delivered
BLK-10022 Nov 2026NashikFreshGoFruits327012Delivered
AMN-10033 Nov 2026PuneMarketRushSnacks111014Delivered
BLK-10043 Nov 2026NagpurFreshGoFruits224011Cancelled
AMN-10054 Nov 2026KolhapurMarketRushDairy423216Delivered
BLK-10064 Nov 2026PuneFreshGoBakery51508Delivered
BLK-10075 Nov 2026SolapurFreshGoHome1129918Delivered
AMN-10086 Nov 2026Sambhaji NagarMarketRushStaples319510Returned
BLK-10097 Nov 2026PuneFreshGoSnacks222013Cancelled
BLK-10108 Nov 2026NashikFreshGoFruits19017Delivered

Lab 1. Build a cross-tab and verify both directions of totals

On Orders, reserve K2:N9 for a small report. Enter the following PIVOTBY in K2. C, D and G refer to City, Platform and Amount from the same source row. The totals and sorts are specified on both axes. City and Platform categories sort ascending, so FreshGo should come before MarketRush.

=PIVOTBY(C2:C11,D2:D11,G2:G11,SUM,0,1,1,1,1)
Read the numbers using the generated category labels. A dash in this explanation means no source order for that combination.
CityFreshGoMarketRushRow total
Kolhapur—232232
Nagpur240—240
Nashik360—360
Pune434110544
Sambhaji Nagar—195195
Solapur1299—1299
Column totals23335372870
  1. Check an intersection. Select Pune and FreshGo in your mind. Find BLK-1001, BLK-1006 and BLK-1009. Their amounts 64, 150 and 220 sum to 434. Verify it under the FreshGo heading on the Pune row.
  2. Check across the city row. The MarketRush Pune contribution is 110 from AMN-1003. Add 434 and 110 to get 544 for Pune.
  3. Check down the platform columns. FreshGo has total ₹2,333 and MarketRush ₹537. Both figures include all currently eligible statuses because no filter was applied.
  4. Check the corner grand total. Add the platform totals to get ₹2,870. You can arrive at the same total by adding the six city totals. =SUM(G2:G11) gives a third check from the source values directly.
  5. Remember the populations. For this SUM report, summing all the displayed numeric cells would combine the detail, city totals, platform totals and their grand total. The original amounts would be counted four times here. Use the grand-total cell once.
Pune FreshGo 434 and Pune MarketRush 110. Across all cities FreshGo contributes 2333 and MarketRush contributes 537.
Verify one detailed crossing and the totals for its two categories.

Identify what an intersection includes

  1. Follow the city row

    Read Pune on the left. The source has four records for that city.

  2. Follow the platform column

    FreshGo keeps three Pune records. MarketRush has the remaining one.

  3. Add the crossing amounts

    FreshGo totals 434 and MarketRush totals 110 inside Pune.

  4. Read the right margin

    Pune across platforms gives 544. The overall source amount is 2,870.

Filter source records before the cross-tab is summarized

Put a second report in a free area, for example Q2. Use the Status test as the tenth argument. The comparison supplies one inclusion choice per order. Only records with Delivered status contribute to any crossing or total in this version.

=PIVOTBY(C2:C11,D2:D11,G2:G11,SUM,0,1,1,1,1,I2:I11="Delivered")

Pune FreshGo becomes ₹214 because the ₹220 cancellation leaves the population. Pune MarketRush remains ₹110 and Pune total becomes ₹324. Across cities FreshGo gives ₹1,873 and MarketRush ₹342, totaling ₹2,215. The city list has four categories. Nagpur and Sambhaji Nagar have no delivered records at all. Reconcile the difference of ₹655 with ₹460 Cancelled and ₹195 Returned.

To see only the group intersections and their labels, set both total-depth settings to 0. On the unfiltered report the six city categories and two platform categories remain. Row and column aggregate margins disappear. To test one axis at a time, compare the output with each argument changed independently.

Distinguish an absent intersection from an observed total of zero

There are no MarketRush orders for Solapur in the base fixture, so that pairing has no observations. A source order of amount zero would be a different fact. Check =COUNTIFS(C2:C11,"Solapur",D2:D11,"MarketRush"). It returns 0 records. If you add a correctly classified zero-amount order to the source and extend the formulas, the same check returns one record for that pairing. Display conventions for empty intersections should not be used as evidence about how many records exist.

Lab 2. Build a PivotTable with the same meaning and compare it

Start with the same ten Orders records. In desktop Excel, select A1:I11 and make an Excel Table with headers. Name it tblPivotOrders. Then choose Insert → PivotTable, and put the new report on a new worksheet. Confirm the selected source is the Table. A fixed A1:I11 selection would still work on today's records, but might leave out the next row unless the source is updated.

  1. Put City in the Rows area and Platform in the Columns area.
  2. Put Amount in Values. Confirm it uses Sum, not Count. If it chose Count, inspect the source data type and change to Sum only after the measures are usable as numbers.
  3. Show the grand totals for both axes if needed. On desktop Excel the PivotTable design settings control grand totals. Compare using the visible labels as keys because the order of categories can differ between layouts.
  4. Verify Pune FreshGo ₹434, Pune MarketRush ₹110 and grand total ₹2,870. For the count alternative, put Order ID in Values using Count. Expect ten recorded IDs overall, and use Sum of Amount again for the money comparison.
  5. Add Status to the Filters area and choose only Delivered. Verify the crossing Pune FreshGo becomes ₹214, Pune MarketRush remains ₹110 and the report total becomes ₹2,215. Clear the filter when you want to compare the next unfiltered test.

As an independent calculation, write =SUMIFS(Orders!G2:G11,Orders!C2:C11,"Pune",Orders!D2:D11,"FreshGo") in a free cell. It gives ₹434 for the all-status version. Add a criterion on the aligned Status column to verify the Delivered ₹214. Using another formula on different cells is a useful check only when it asks the same question of the same source population.

Check new records and refresh settings

In a copy convert the PIVOTBY source references to structured fields with the same business rules. Then add one source record for a Pune FreshGo order worth ₹125, with Delivered status. Confirm its unique ID and that it is inside the Table. In the unfiltered views, Pune FreshGo becomes ₹559, Pune total becomes ₹669 and the grand total becomes ₹2,995.

=PIVOTBY(tblPivotOrders[City],tblPivotOrders[Platform],tblPivotOrders[Amount],SUM,0,1,1,1,1)

The worksheet formula should recalculate from its Table inputs when the workbook calculates. For the PivotTable, inspect whether Auto Refresh is available and enabled for the source. Microsoft documents automatic refresh for newer supported contexts and manual refresh elsewhere. If your edition does not update automatically on this local change, use PivotTable Analyze → Refresh or the equivalent command in your app. Confirm the new figures in both reports rather than relying on the visual timing alone.

If a source becomes external, updating the underlying file, refreshing the import, and recalculating a formula may be separate operations. Record which one is required in the workbook. A PIVOTBY that recalculates immediately from an old imported range can still give an out-of-date answer. Test deliberately with a known source change and verify the imported data first.

Choose the report controls your readers need

  • PIVOTBY suits a formula-driven layout. It can take arrays computed by other formulas. The result belongs to one anchor and may be referenced with that anchor's spill reference. Check whether dependent formulas rely on positions that can change as categories grow.
  • A PivotTable supports interactive exploration. It offers its own field controls and a report object with formatting and layout settings. Supported PivotTables can use slicers and show source details under the options available to their source and platform.
  • Choose features that the receiving app supports. A configurable workbook with a Data Model can use a different set of operations from a PivotTable on a plain worksheet. A formula output is not a Data Model measure. Check the edition and source before assuming a feature is available.
  • Use named measures and known checks. A PivotTable with Sum of Amount and one with Count of ID look similar at a glance. Use a clear heading, date window and filter label. Verify source amount, row total, column total and one known intersection after changing the design.

Keep both practice versions while learning. In the formula report, change the grouping axis by editing the formula. In the PivotTable, change the layout by moving fields. In both cases the question changes if you swap City and Platform. Preserve your confirmed numeric result before experimenting with a different view. Chapter 7 has the full PivotTables and PivotCharts sequence.

Show the percentage basis beside its heading

A percentage is a ratio. Start with the Pune FreshGo amount of ₹434. There are three different denominators available. The Pune total ₹544 tells how much FreshGo contributed inside Pune. The FreshGo column total ₹2,333 tells how much Pune contributed inside FreshGo. The overall amount ₹2,870 tells the crossing's contribution across the whole report. All three answers use the same numerator but mean different things.

Pune FreshGo 434 divided by Pune total 544 is 79.8 percent, divided by FreshGo total 2333 is 18.6 percent, and divided by overall 2870 is 15.1 percent.
Check which total supplies the denominator before comparing percentages.
  • Row basis, relative_to 1. Read about 79.8% for FreshGo in Pune and 20.2% for MarketRush in Pune. Their unrounded shares add to 100% because they cover the same complete row.
  • Column basis, relative_to 0. Pune's ₹434 is about 18.6% of all FreshGo amounts. Other Pune stores are outside that denominator. With all city categories present, the unrounded shares in the FreshGo column add to 100%.
  • Grand-total basis, relative_to 2. Pune FreshGo is about 15.1% of all amounts. Solapur FreshGo is about 45.3% of the grand total, or about 55.7% of the FreshGo column total. Writing the intended denominator is essential.
=PIVOTBY(C2:C11,D2:D11,G2:G11,PERCENTOF,0,1,1,1,1,,1)

In a scratch area, try the formula above for the row basis. There is no filter argument between the final ascending column order and the final relative-to choice. Format the numeric results as percentages. Change the final 1 to 0 or 2 to test the other denominators. The relative-to setting affects a two-input aggregation that uses the comparison set, such as PERCENTOF. It does not turn a SUM result into a share.

Microsoft also documents parent-column and parent-row comparisons, 3 and 4, for cases with appropriate nested fields. If a report has one group on each axis, use the direct row, column or grand denominator until you specify which parent level you need. With more levels, independently test a known cell before presenting the result. No denominator should silently include cancelled orders if the report claims to describe delivered amounts only.

Make a worksheet cross-tab with independently verifiable formulas

A colleague on another Excel edition might open the workbook without PIVOTBY support. They can use the PivotTable lab or make a small worksheet comparison with the same business rules. In a new Check sheet, put FreshGo in B1 and MarketRush in C1. In A2:A7 list Kolhapur, Nagpur, Nashik, Pune, Sambhaji Nagar and Solapur. This example manually specifies the categories so you can verify exactly which labels each formula uses.

=SUMIFS(Orders!$G$2:$G$11,Orders!$C$2:$C$11,$A2,Orders!$D$2:$D$11,B$1)
  1. Enter the formula in B2. The three Orders ranges stay anchored as you fill. The row criterion fixes column A but allows the current result row to change. The column criterion fixes row 1 but allows its column to change.
  2. Fill right through C2 and down through row 7. In row 5, the formula reads Pune from A5. The two columns should show 434 and 110 under their respective labels.
  3. In D1 use Row total. Enter =SUM(B2:C2) in D2 and fill down. D5 is 544. Put Totals in A8 and total the six numbers above each of B8, C8 and D8. They should give 2,333, 537 and 2,870.
  4. A SUMIFS without a match returns zero. If you need the display to distinguish no records and an observed numeric zero, add COUNTIFS over the same City and Platform combination. For Kolhapur FreshGo the count is 0. For Pune FreshGo it is 3.

This explicit grid is also a reality check for percentages. In an independent cell, divide B5 by D5 for the row basis, B5 by B8 for the column basis and B5 by D8 for the grand-total basis. Format the results as percentages. Then compare the same crossing in your PIVOTBY versions. Both reports can have different category order while sharing the same numbers. Match all checks by label.

To verify the Delivered variant, add the Status condition to the filled SUMIFS and keep its source range anchored. This fixed grid still shows the two cities without delivered orders, with zeros under the SUMIFS rule. The dynamic cross-tab omits those city categories. Compare matching labels and inspect record counts when the two displays return different numbers of rows.

An important limitation follows from manual labels. If a new city appears in Orders, this Check grid will not automatically list it. The PIVOTBY formula can grow with a Table. For a stable list of required city names, a fixed report can intentionally include places with no results. Choose whether labels represent every expected city or only cities where records were received. Apply the same policy when comparing the two reports.

Use a fully populated four-order control to test direction

On a scratch tab, enter this smaller fixture beginning in A1. It represents an imaginary tea and coffee shop with two regions. Every combination of Region and Product exists. When troubleshooting a larger cross-tab, a complete miniature case helps you see whether the row and column fields are reversed.

Region in A, Product in B and Amount in C.
RegionProductAmount
WestTea100
WestCoffee200
EastTea150
EastCoffee50
=PIVOTBY(A2:A5,B2:B5,C2:C5,SUM,0,1,1,1,1)

East should be the first row label and West the next. Coffee comes before Tea among the ascending columns. East shows 50 Coffee and 150 Tea, with total 200. West shows 200 Coffee and 100 Tea, with total 300. The Coffee total is 250 and the Tea total is also 250. The whole report totals 500.

Now swap the first two arguments. Product becomes the row field and Region becomes the column field. The grand total stays 500. The underlying West Coffee cell remains 200 where those labels cross. This independent control proves that a valid overall amount says little about which field was used for each axis. A mislabeled transpose can look plausible until you check the known cell and labels together.

Try changing col_sort_order from 1 to −1 in the original orientation. The category labels now appear Tea then Coffee, in descending alphabetical order. Every cell retains its two defining categories. In the ten-order fixture, descending platform labels means MarketRush before FreshGo. When a later formula needs the value for a specific platform, its assumption about the order must be tested after this kind of change.

Practice and answer key

Use the untouched ten-order source again. Type each expression into a clean area. Label the measures separately, even when the axis categories are the same. Check either an intersection or a margin for every answer.

Show amounts by City and Platform

Use the unfiltered Lab 1 formula. The Pune row is 434 under FreshGo and 110 under MarketRush, together 544. Check the two-platform column labels before comparing these positions with another view.

Count records for each City and Status

Use =PIVOTBY(C2:C11,I2:I11,A2:A11,COUNTA,0,1,1,1,1). Pune has three Delivered and one Cancelled. A count of observed orders uses the populated IDs in this fixture. The total of ten describes order records.

Find the cancelled FreshGo amount

Use =PIVOTBY(D2:D11,I2:I11,G2:G11,SUM,0,1,1,1,1). FreshGo is a row label, Cancelled a column label. The crossing is 460 from the two canceled orders of 240 and 220. This is order amount, not evidence of an issued refund.

Remove both total margins from the city-platform cross-tab

Use =PIVOTBY(C2:C11,D2:D11,G2:G11,SUM,0,0,1,0,1). It still shows six city categories and two platform categories. Neither axis contributes its grand total. The included source records and crossing values remain the same.

Sum the quantities for each City and Platform

Use =PIVOTBY(C2:C11,D2:D11,F2:F11,SUM,0,1,1,1,1). Pune FreshGo has 2 plus 5 plus 2, or 9 units. Pune MarketRush has 1. The city sum is 10 units out of a total 24 units in the source.

Show each crossing as a share of the grand total

Use =PIVOTBY(C2:C11,D2:D11,G2:G11,PERCENTOF,0,1,1,1,1,,2). Solapur FreshGo's ₹1,299 is about 45.26% of the overall ₹2,870. The trailing 2 makes that denominator explicit. The default column ratio would use the FreshGo total of ₹2,333.

Find the category with the most FreshGo units

Use =PIVOTBY(E2:E11,D2:D11,F2:F11,SUM,0,1,1,1,1). Fruits leads FreshGo with six units across its three orders. FreshGo totals 16 units and MarketRush totals eight. For the column-share version use PERCENTOF with final relative_to 0. Fruits forms 6 ÷ 16, or 37.5% of FreshGo units.

Group dates by month without mixing years

Ravina wants platforms across the columns and months down the left. If each source date is passed directly as a grouping field, Nov 2 and Nov 3 are different labels. The report needs a grouping key at monthly grain. Use the first day of each order month as the key. A field named Month can still be a real date rather than the visible three-letter month name.

  1. On Orders, temporarily reserve J1:J11 in a clean copy. Put Month start in J1. In J2 enter =DATE(YEAR(B2),MONTH(B2),1) and fill down through the ten source records. Use this only after confirming B contains valid dates in every included row.
  2. Format J2:J11 with mmm yyyy. The labels show Nov 2026, but the stored values are dates for November 1, 2026. A different November in a different year would produce another date.
  3. In a new area use =PIVOTBY(J2:J11,D2:D11,G2:G11,SUM,0,1,1,1,1). Our source has one month and both platforms. The month row gives FreshGo ₹2,333 and MarketRush ₹537, total ₹2,870.
  4. In the practice copy add one FreshGo order on November 1, 2027 with numeric amount 125. Extend the input ranges or Table and the Month start formula. Verify there are two month rows. The 2026 row stays 2,870 and Nov 2027 contributes 125. The grand total is 2,995.

Grouping by text such as Nov would combine the two years. Even separate formatted text month labels can sort alphabetically instead of chronologically. A real date month-start number sorts by time. If you choose a financial period rather than a calendar month, check which date and business mapping define that period before aggregating.

In a PivotTable, the worksheet Month start field supports the same grouping. Desktop Excel also offers date grouping for appropriate sources. If using it, verify the report separates Year and Month so the same month names in different years do not merge. For the comparison, test both reports on the known extra-year row and reconcile the grand total. Restore the original fixture after observing the second month.

Use separate titles if one report groups daily and another groups monthly. They may have the same overall amount while showing a different number of rows. Choose the grain that answers the question. A reader comparing totals for different time windows should see those dates before interpreting percentages.

Check the report before sending it to another team

The result spills into a blocked cell

A cross-tab can grow in either direction. Adding a city increases the number of rows. Adding a platform increases the number of columns. Leave room around the anchor and put other formulas in separate stable areas. When the output fits today but fails after a new source row, check which new category changed its dimensions. Select the spill error and inspect the blocked location before moving the report or removing a known test blocker.

The source arrays line up in size but the headings or records do not agree

Confirm the start and end records in all input arrays, including the filter. If selecting headers with field header mode 3, check that the first cells are actually headings for each grouping field and measure. The examples use mode 0 and start every input at row 2. An amount range starting at G3 instead would assign every following amount to an earlier order. The worksheet could still accept the same number of values. A known crossing is the fastest way to detect a membership error before auditing every individual record.

A percentage surprises the reviewer

Copy the numerator and the candidate denominators to a separate area and divide with plain arithmetic. Pune FreshGo has the same numerator of ₹434 under all three test reports. If the reviewer expected 79.8% and received 18.6%, they probably compared the store’s share inside Pune with Pune's share inside the store. Look at the trailing relative_to argument and the actual active filter. An unlabeled ratio can be mathematically right and still misleading.

The report should respond to a named status setting

A reader might choose Delivered, Cancelled or Returned. Put that choice in J2, where it sits outside Orders and outside the output. Use the same predicate for the zero-match guard and for the cross-tab. Make this version in a clean part of the Orders sheet with plenty of space.

=LET(statusChoice,$J$2,includeRows,I2:I11=statusChoice,
     IF(SUM(--includeRows)=0,"No orders for this status",
        PIVOTBY(C2:C11,D2:D11,G2:G11,SUM,0,1,1,1,1,includeRows)))

Delivered gives four city groups and two platform groups with overall amount ₹2,215. Cancelled gives two city groups, Nagpur and Pune, and one platform group, FreshGo, with overall amount ₹460. Returned gives only Sambhaji Nagar and MarketRush with ₹195. Set J2 to an unused status such as Pending review. The report should show a message with no report grid. A formula that reads its old MarketRush column by position may fail or read a total column under a new setting. Use the report's categories and membership explicitly or calculate a required crossing directly with aligned SUMIFS.

Leave a useful verification note

Record one checked cell, one row total, one column total and the grand total. For this source, “Pune FreshGo 434, Pune all platforms 544, all FreshGo 2,333, all orders 2,870” makes a compact control set. Include the date window and status policy with that note. If the report uses percentages, replace the comparison figures with the numerator and chosen denominator. The next person can then distinguish a changed input from a calculation error.

Quiz with explained answers

Which source records belong to the Pune FreshGo amount?

Orders from Pune and FreshGo simultaneously. In the all-status fixture those are BLK-1001, BLK-1006 and BLK-1009. Their amounts are 64, 150 and 220. The MarketRush Pune order of 110 belongs beside this value rather than inside it.

Which figure describes Pune across both platforms?

The row total of ₹544. It contains both the ₹434 FreshGo crossing and the ₹110 MarketRush crossing. The FreshGo column total of ₹2,333 includes every city for that store, so it describes a different population.

What changes when the formula keeps only Delivered records?

BLK-1009's ₹220 is excluded from the Pune FreshGo intersection. The value drops to ₹214. The Pune MarketRush intersection stays ₹110, so the city total is now ₹324. The all-delivered grand total is ₹2,215.

Which relative_to value answers what share of FreshGo comes from Pune?

Use 0, the column basis, because platforms form the columns. The numerator ₹434 belongs to Pune FreshGo and the denominator ₹2,333 is the complete FreshGo column. The result is about 18.6%. Swapping the axes would change which direction represents that basis.

What changes when both total-depth arguments are zero?

The two total margins are omitted. The group labels and included detail values stay. This makes a simpler report for a later analysis that needs only city-platform crossings. A separate source control can still verify the overall amount.

What does a missing Solapur MarketRush crossing tell you?

The known source contains no order with those two category values together. Verify that with a count, not by assuming all empty-looking cells mean a numeric zero. A real zero-amount order would still add one observation to the intersection count.

Interview questions you can answer from practice

When does a two-axis summary help more than a single grouping?

Use it when comparisons across two categories matter. For orders by city, a single grouping gives Pune 544. A cross-tab adds platform columns and reveals the split of 434 and 110. If the categories are numerous, consider whether a tall list of group pairs is easier to use.

How do you independently verify a single PIVOTBY cell?

Take the row label and column label as two conditions. Add the source Amount using those same conditions with SUMIFS, including active filters if any. For Pune FreshGo the unfiltered check gives 434, and keeping only Delivered gives 214. Verify that the three ranges cover the same rows.

How would you choose a formula or a PivotTable for a colleague?

I would ask whether the result needs to feed formulas or needs controls for changing the report layout. PIVOTBY gives a reusable spill from aligned inputs. A PivotTable provides a report object with field controls and platform-specific features. I would prove both answer the same question by checking one crossing and the totals.

What makes a report current after a change to a source file?

The changed record needs to reach the source range or Table. The formula needs to recalculate from it, or the PivotTable needs to reflect a refresh under its settings. An imported source can require a separate refresh. I would use a known new order with a predictable amount and check the affected intersection and grand total.

How do you prevent accidental double counting in a cross-tab?

Aggregate from source numbers or use one grand total, or sum only mutually exclusive intersections. Row and column totals reuse those same observations. When a report feeds another calculation, explicitly exclude the total margins or construct a separate detail-only view.

Revision cards

  • Two category directions. City down the side and Platform across the top define each intersection.
  • Totals reconcile. Add row totals or column totals separately and check against source amounts.
  • Filter before summarizing. Only eligible records contribute to group cells and totals.
  • Label the denominator. A row share, column share and overall share can all be right for the same amount.
  • Check refresh behaviour. Know what the formula or PivotTable reads and when that data arrives.
  • Choose by label. Output positions can move when the order or number of categories changes.

Microsoft references