Forum Discussion
Chastitycaprice
Apr 06, 2024Copper Contributor
How do I get the Total Sales data to match the latest monthly sales data available in each row?
Hello everyone, I would like the last column below (Total Sales $) to match the latest monthly sales data for each row, ignoring the purchase qty column information (Example: Jan Pur Qty, Feb Pu...
- Apr 09, 2024
Use HSTACK:
=XLOOKUP(1, (HSTACK(N4, P4, R4, T4, V4) <> "") * (HSTACK(N4, P4, R4, T4, V4) <> 0), HSTACK(N4, P4, R4, T4, V4), , , -1)
Patrick2788
Apr 06, 2024Silver Contributor
A 365 solution. I see you're working in a table, so my solution includes structured references.
=LET(
sales, DROP(WRAPROWS(Table1[@[Dec Pur QtA]:[Mar Sales $]], 2), , 1),
MAX(sales)
)
Also, you may want to make certain all your numbers are being treated as such. If you click those green tags in the sheet, it may offer to convert numbers stored as text to numbers.