Spreadsheet: 831769d1685881241-unpivot-columns-without-power-query-unpivot-example-sheet
Sheet: Sheet1

Input format |  |  |  |  |  |  |  |  |  | Desired result in dynamic array without Power Query
Owner | Cost center | Direct/indrect | Group | G/L account | Account | 2023 - 1 | 2023 - 2 | 2023 - 3 |  | Owner | Cost center | Direct/indrect | Group | G/L account | Account | Period | Value
Person X | Finance | Indirect | [1] Salaries and wages | 2000 - Gross salaries | Personnel | -6500 | -6500 | -6500 |  | Person X | Finance | Indirect | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 1 | -6500
Person X | Finance | Indirect | [2] Subscriptions | 1000 - Subscriptions (annual) | Microsoft | -500 | -500 | -500 |  | Person X | Finance | Indirect | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 2 | -6500
Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Reddit | -2500 | -500 | -2929 |  | Person X | Finance | Indirect | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 3 | -6500
Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Facebook | -3000 | -4506 | -4793 |  | Person X | Finance | Indirect | [2] Subscriptions | 1000 - Subscriptions (annual) | Microsoft | 2023 - 1 | -500
Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Google | -5000 | -4955 | -1283 |  | Person X | Finance | Indirect | [2] Subscriptions | 1000 - Subscriptions (annual) | Microsoft | 2023 - 2 | -500
Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | [NAME] | -60000 | -8310 | -21832 |  | Person X | Finance | Indirect | [2] Subscriptions | 1000 - Subscriptions (annual) | Microsoft | 2023 - 3 | -500
Person X | Delivery | Direct | [1] Salaries and wages | 2000 - Gross salaries | Personnel | -3000 | -3000 | -3000 |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Reddit | 2023 - 1 | -2500
Person X | Delivery | Direct | [4] Other cost of sales | 3000 - Other expenses | Other | -500 | -500 | -500 |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Reddit | 2023 - 2 | -500
Person Y | Delivery | Revenues | [0] Revenues | 8001 - Type 1 revenues | Company X | 20000 | 30000 | 40000 |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Reddit | 2023 - 3 | -2929
Person Y | Delivery | Revenues | [0] Revenues | 8002 - Type 2 revenues | Company Y | 1000 | 1500 | 2000 |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Facebook | 2023 - 1 | -3000
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Facebook | 2023 - 2 | -4506
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Facebook | 2023 - 3 | -4793
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Google | 2023 - 1 | -5000
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Google | 2023 - 2 | -4955
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | Google | 2023 - 3 | -1283
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | [NAME] | 2023 - 1 | -60000
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | [NAME] | 2023 - 2 | -8310
 |  |  |  |  |  |  |  |  |  | Person X | Marketing | Indirect | [3] Promotions | 1001 - Promotional expenses | [NAME] | 2023 - 3 | -21832
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 1 | -3000
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 2 | -3000
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [1] Salaries and wages | 2000 - Gross salaries | Personnel | 2023 - 3 | -3000
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [4] Other cost of sales | 3000 - Other expenses | Other | 2023 - 1 | -500
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [4] Other cost of sales | 3000 - Other expenses | Other | 2023 - 2 | -500
 |  |  |  |  |  |  |  |  |  | Person X | Delivery | Direct | [4] Other cost of sales | 3000 - Other expenses | Other | 2023 - 3 | -500
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8001 - Type 1 revenues | Company X | 2023 - 1 | 20000
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8001 - Type 1 revenues | Company X | 2023 - 2 | 30000
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8001 - Type 1 revenues | Company X | 2023 - 3 | 40000
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8002 - Type 2 revenues | Company Y | 2023 - 1 | 1000
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8002 - Type 2 revenues | Company Y | 2023 - 2 | 1500
 |  |  |  |  |  |  |  |  |  | Person Y | Delivery | Revenues | [0] Revenues | 8002 - Type 2 revenues | Company Y | 2023 - 3 | 2000