从 wide-table 格式到 long-table (动态)

Go from wide-table format to long-table (dynamic)

我正在尝试使用 Google 电子表格从 'wide-formatted' table see image sample to a 'long-formatted' table see image sample 开始。

考虑到这一点,我创建了一个电子表格来重新创建场景:

测试文档:https://docs.google.com/spreadsheets/d/1lKAFCON2Bh8n3etGKTEFI3LklGdfMT0wrKm1JyoOHag/edit?usp=sharing

选项卡 'wide' 有一个数据最初格式化的示例。 Tab 'long' 是预期的输出(所有 id-tags 可能的唯一组合)

获取 'long-table' 格式数据的最佳方法是什么,它还使我能够捕获原始数据源的任何更新?

谢谢!

尝试:

={"id"\ "tag"; ARRAYFORMULA(SPLIT(QUERY(FLATTEN(
 IF(wide!B2:Z="";;wide!A2:A&"♦"&wide!B2:Z)); 
 "where Col1 is not null"); "♦"))}