I have a raw spreadsheet with 30k+ rows like below.
I'm trying to create a report on last non-empty cell value for each profile_id. But as this is already data-heavy sheet, we've decided the create the report in a different Report sheet using.
I've tried using =ArrayFormula(LOOKUP(1, ArrayFormula(1/(A2:E2<>"")),A2:E2))
to get the last filled column value, but it requires importing the entire data to reporting sheet, and it means 30K+ formulas in each cell, which is not desired
Ideally what I'm looking for is something similar to
=query(IMPORTRANGE("spreadsheet_url_link","calling_sheet!B:F"),
"Select COALESCE(Col6, Col5, Col4, Col3, Col2) where Col1 is not null")
Expected Outcome
Any ideas or pointers to achieve this would be helpful here.