@luquimbo/bi-superpowers 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.claude-plugin/plugin.json +8 -0
  2. package/.mcp.json +25 -0
  3. package/AGENTS.md +244 -0
  4. package/CHANGELOG.md +265 -0
  5. package/LICENSE +21 -0
  6. package/README.md +211 -0
  7. package/bin/build-plugin.js +30 -0
  8. package/bin/cli.js +1064 -0
  9. package/bin/commands/add.js +533 -0
  10. package/bin/commands/add.test.js +77 -0
  11. package/bin/commands/build-desktop.js +166 -0
  12. package/bin/commands/changelog.js +443 -0
  13. package/bin/commands/diff.js +325 -0
  14. package/bin/commands/lint.js +419 -0
  15. package/bin/commands/lint.test.js +103 -0
  16. package/bin/commands/mcp-setup.js +246 -0
  17. package/bin/commands/pull.js +287 -0
  18. package/bin/commands/pull.test.js +36 -0
  19. package/bin/commands/push.js +231 -0
  20. package/bin/commands/push.test.js +14 -0
  21. package/bin/commands/search.js +344 -0
  22. package/bin/commands/search.test.js +115 -0
  23. package/bin/commands/setup.js +545 -0
  24. package/bin/commands/setup.test.js +46 -0
  25. package/bin/commands/sync-profile.js +405 -0
  26. package/bin/commands/sync-profile.test.js +14 -0
  27. package/bin/commands/sync-source.js +418 -0
  28. package/bin/commands/sync-source.test.js +14 -0
  29. package/bin/commands/watch.js +206 -0
  30. package/bin/lib/generators/claude-plugin.js +266 -0
  31. package/bin/lib/generators/claude-plugin.test.js +110 -0
  32. package/bin/lib/generators/index.js +116 -0
  33. package/bin/lib/generators/shared.js +282 -0
  34. package/bin/lib/licensing/index.js +35 -0
  35. package/bin/lib/licensing/storage.js +364 -0
  36. package/bin/lib/licensing/storage.test.js +55 -0
  37. package/bin/lib/licensing/validator.js +213 -0
  38. package/bin/lib/licensing/validator.test.js +137 -0
  39. package/bin/lib/microsoft-mcp.js +176 -0
  40. package/bin/lib/microsoft-mcp.test.js +106 -0
  41. package/bin/lib/skills.js +84 -0
  42. package/bin/mcp/powerbi-modeling-launcher.js +38 -0
  43. package/bin/postinstall.js +44 -0
  44. package/bin/utils/errors.js +159 -0
  45. package/bin/utils/git.js +298 -0
  46. package/bin/utils/logger.js +142 -0
  47. package/bin/utils/mcp-detect.js +274 -0
  48. package/bin/utils/mcp-detect.test.js +105 -0
  49. package/bin/utils/pbix.js +305 -0
  50. package/bin/utils/pbix.test.js +37 -0
  51. package/bin/utils/profiles.js +312 -0
  52. package/bin/utils/projects.js +168 -0
  53. package/bin/utils/readline.js +206 -0
  54. package/bin/utils/readline.test.js +47 -0
  55. package/bin/utils/tui.js +314 -0
  56. package/bin/utils/tui.test.js +127 -0
  57. package/commands/contributions.md +265 -0
  58. package/commands/data-model-design.md +468 -0
  59. package/commands/dax-doctor.md +248 -0
  60. package/commands/fabric-scripts.md +452 -0
  61. package/commands/migration-assistant.md +290 -0
  62. package/commands/model-documenter.md +242 -0
  63. package/commands/pbi-connect.md +239 -0
  64. package/commands/project-kickoff.md +905 -0
  65. package/commands/report-layout.md +296 -0
  66. package/commands/rls-design.md +533 -0
  67. package/commands/theme-tweaker.md +624 -0
  68. package/config.example.json +23 -0
  69. package/config.json +23 -0
  70. package/desktop-extension/manifest.json +37 -0
  71. package/desktop-extension/package.json +10 -0
  72. package/desktop-extension/server.js +95 -0
  73. package/docs/openrouter-free-models.md +92 -0
  74. package/library/examples/README.md +151 -0
  75. package/library/examples/finance-reporting/README.md +351 -0
  76. package/library/examples/finance-reporting/data-model.md +267 -0
  77. package/library/examples/finance-reporting/measures.dax +557 -0
  78. package/library/examples/hr-analytics/README.md +371 -0
  79. package/library/examples/hr-analytics/data-model.md +315 -0
  80. package/library/examples/hr-analytics/measures.dax +460 -0
  81. package/library/examples/marketing-analytics/README.md +37 -0
  82. package/library/examples/marketing-analytics/data-model.md +62 -0
  83. package/library/examples/marketing-analytics/measures.dax +110 -0
  84. package/library/examples/retail-analytics/README.md +439 -0
  85. package/library/examples/retail-analytics/data-model.md +288 -0
  86. package/library/examples/retail-analytics/measures.dax +481 -0
  87. package/library/examples/supply-chain/README.md +37 -0
  88. package/library/examples/supply-chain/data-model.md +69 -0
  89. package/library/examples/supply-chain/measures.dax +77 -0
  90. package/library/examples/udf-library/README.md +228 -0
  91. package/library/examples/udf-library/functions.dax +571 -0
  92. package/library/snippets/dax/README.md +292 -0
  93. package/library/snippets/dax/business-domains.md +576 -0
  94. package/library/snippets/dax/calculate-patterns.md +276 -0
  95. package/library/snippets/dax/calculation-groups.md +489 -0
  96. package/library/snippets/dax/error-handling.md +495 -0
  97. package/library/snippets/dax/iterators-and-aggregations.md +474 -0
  98. package/library/snippets/dax/kpis-and-metrics.md +293 -0
  99. package/library/snippets/dax/rankings-and-topn.md +235 -0
  100. package/library/snippets/dax/security-patterns.md +413 -0
  101. package/library/snippets/dax/text-and-formatting.md +316 -0
  102. package/library/snippets/dax/time-intelligence.md +196 -0
  103. package/library/snippets/dax/user-defined-functions.md +477 -0
  104. package/library/snippets/dax/virtual-tables.md +546 -0
  105. package/library/snippets/excel-formulas/README.md +84 -0
  106. package/library/snippets/excel-formulas/aggregations.md +330 -0
  107. package/library/snippets/excel-formulas/dates-and-times.md +361 -0
  108. package/library/snippets/excel-formulas/dynamic-arrays.md +314 -0
  109. package/library/snippets/excel-formulas/lookups.md +169 -0
  110. package/library/snippets/excel-formulas/text-functions.md +363 -0
  111. package/library/snippets/governance/naming-conventions.md +97 -0
  112. package/library/snippets/governance/review-checklists.md +107 -0
  113. package/library/snippets/power-query/README.md +389 -0
  114. package/library/snippets/power-query/api-integration.md +707 -0
  115. package/library/snippets/power-query/connections.md +434 -0
  116. package/library/snippets/power-query/data-cleaning.md +298 -0
  117. package/library/snippets/power-query/error-handling.md +526 -0
  118. package/library/snippets/power-query/parameters.md +350 -0
  119. package/library/snippets/power-query/performance.md +506 -0
  120. package/library/snippets/power-query/transformations.md +330 -0
  121. package/library/snippets/report-design/accessibility.md +78 -0
  122. package/library/snippets/report-design/chart-selection.md +54 -0
  123. package/library/snippets/report-design/layout-patterns.md +87 -0
  124. package/library/templates/data-models/README.md +93 -0
  125. package/library/templates/data-models/finance-model.md +627 -0
  126. package/library/templates/data-models/retail-star-schema.md +473 -0
  127. package/library/templates/excel/README.md +83 -0
  128. package/library/templates/excel/budget-tracker.md +432 -0
  129. package/library/templates/excel/data-entry-form.md +533 -0
  130. package/library/templates/power-bi/README.md +72 -0
  131. package/library/templates/power-bi/finance-report.md +449 -0
  132. package/library/templates/power-bi/kpi-scorecard.md +461 -0
  133. package/library/templates/power-bi/sales-dashboard.md +281 -0
  134. package/library/themes/excel/README.md +436 -0
  135. package/library/themes/power-bi/README.md +271 -0
  136. package/library/themes/power-bi/accessible.json +307 -0
  137. package/library/themes/power-bi/bi-superpowers-default.json +858 -0
  138. package/library/themes/power-bi/corporate-blue.json +291 -0
  139. package/library/themes/power-bi/dark-mode.json +291 -0
  140. package/library/themes/power-bi/minimal.json +292 -0
  141. package/library/themes/power-bi/print-friendly.json +309 -0
  142. package/package.json +93 -0
  143. package/skills/contributions/SKILL.md +267 -0
  144. package/skills/data-model-design/SKILL.md +470 -0
  145. package/skills/data-modeling/SKILL.md +254 -0
  146. package/skills/data-quality/SKILL.md +664 -0
  147. package/skills/dax/SKILL.md +708 -0
  148. package/skills/dax-doctor/SKILL.md +250 -0
  149. package/skills/dax-udf/SKILL.md +489 -0
  150. package/skills/deployment/SKILL.md +320 -0
  151. package/skills/excel-formulas/SKILL.md +463 -0
  152. package/skills/fabric-scripts/SKILL.md +454 -0
  153. package/skills/fast-standard/SKILL.md +509 -0
  154. package/skills/governance/SKILL.md +205 -0
  155. package/skills/migration-assistant/SKILL.md +292 -0
  156. package/skills/model-documenter/SKILL.md +244 -0
  157. package/skills/pbi-connect/SKILL.md +241 -0
  158. package/skills/power-query/SKILL.md +406 -0
  159. package/skills/project-kickoff/SKILL.md +907 -0
  160. package/skills/query-performance/SKILL.md +480 -0
  161. package/skills/report-design/SKILL.md +207 -0
  162. package/skills/report-layout/SKILL.md +298 -0
  163. package/skills/rls-design/SKILL.md +535 -0
  164. package/skills/semantic-model/SKILL.md +237 -0
  165. package/skills/testing-validation/SKILL.md +643 -0
  166. package/skills/theme-tweaker/SKILL.md +626 -0
  167. package/src/content/base.md +237 -0
  168. package/src/content/mcp-requirements.json +69 -0
  169. package/src/content/routing.md +203 -0
  170. package/src/content/skills/contributions.md +259 -0
  171. package/src/content/skills/data-model-design.md +462 -0
  172. package/src/content/skills/data-modeling.md +246 -0
  173. package/src/content/skills/data-quality.md +656 -0
  174. package/src/content/skills/dax-doctor.md +242 -0
  175. package/src/content/skills/dax-udf.md +481 -0
  176. package/src/content/skills/dax.md +700 -0
  177. package/src/content/skills/deployment.md +312 -0
  178. package/src/content/skills/excel-formulas.md +455 -0
  179. package/src/content/skills/fabric-scripts.md +446 -0
  180. package/src/content/skills/fast-standard.md +501 -0
  181. package/src/content/skills/governance.md +197 -0
  182. package/src/content/skills/migration-assistant.md +284 -0
  183. package/src/content/skills/model-documenter.md +236 -0
  184. package/src/content/skills/pbi-connect.md +233 -0
  185. package/src/content/skills/power-query.md +398 -0
  186. package/src/content/skills/project-kickoff.md +899 -0
  187. package/src/content/skills/query-performance.md +472 -0
  188. package/src/content/skills/report-design.md +199 -0
  189. package/src/content/skills/report-layout.md +290 -0
  190. package/src/content/skills/rls-design.md +527 -0
  191. package/src/content/skills/semantic-model.md +229 -0
  192. package/src/content/skills/testing-validation.md +635 -0
  193. package/src/content/skills/theme-tweaker.md +618 -0
@@ -0,0 +1,463 @@
1
+ ---
2
+ name: "excel-formulas"
3
+ description: "Use when the user asks about Excel Formulas Skill, especially phrases like \"Excel formula\", \"XLOOKUP\", \"dynamic array\", \"LET formula\", \"named range\", \"conditional formatting formula\"."
4
+ version: "1.0.0"
5
+ ---
6
+
7
+ <!-- Generated by BI Agent Superpowers. Edit src/content/skills/excel-formulas.md instead. -->
8
+
9
+ # Excel Formulas Skill
10
+
11
+ ## Trigger
12
+ Activate this skill when user mentions:
13
+ - "Excel formula", "Excel function", "spreadsheet"
14
+ - "XLOOKUP", "VLOOKUP", "INDEX MATCH"
15
+ - "dynamic array", "FILTER", "SORT", "UNIQUE"
16
+ - "LET formula", "LAMBDA"
17
+ - "named range", "structured reference"
18
+ - "conditional formatting formula"
19
+ - "array formula", "spill range"
20
+
21
+ ## Identity
22
+ You are an **Excel Formula Expert** specializing in modern Excel (365/2021+) formulas, dynamic arrays, and efficient calculation patterns. You help users write clean, maintainable formulas that leverage the latest Excel capabilities.
23
+
24
+ ---
25
+
26
+ ## Naming Conventions
27
+
28
+ | Element | Convention | Example |
29
+ |---------|------------|---------|
30
+ | Named Ranges | PascalCase, descriptive | `TaxRate`, `StartDate`, `SalesData` |
31
+ | Tables | `tbl_` prefix | `tbl_Sales`, `tbl_Employees` |
32
+ | Dynamic Ranges | `rng_` prefix | `rng_ActiveProducts` |
33
+ | Parameters | `param_` prefix | `param_Region`, `param_Year` |
34
+
35
+ ---
36
+
37
+ ## Dynamic Arrays (Excel 365+)
38
+
39
+ ### Core Functions
40
+ | Function | Purpose | Spills? |
41
+ |----------|---------|---------|
42
+ | `FILTER` | Filter rows by condition | Yes |
43
+ | `SORT` | Sort data | Yes |
44
+ | `SORTBY` | Sort by another column | Yes |
45
+ | `UNIQUE` | Remove duplicates | Yes |
46
+ | `SEQUENCE` | Generate number sequence | Yes |
47
+ | `RANDARRAY` | Generate random numbers | Yes |
48
+ | `XLOOKUP` | Modern lookup | No* |
49
+ | `XMATCH` | Modern match | No |
50
+ | `TAKE` | First/last N rows | Yes |
51
+ | `DROP` | Skip N rows | Yes |
52
+ | `CHOOSECOLS` | Select columns | Yes |
53
+ | `CHOOSEROWS` | Select rows | Yes |
54
+ | `EXPAND` | Expand to size | Yes |
55
+ | `VSTACK` | Stack vertically | Yes |
56
+ | `HSTACK` | Stack horizontally | Yes |
57
+ | `TEXTSPLIT` | Split text to array | Yes |
58
+ | `TEXTJOIN` | Join array to text | No |
59
+ | `WRAPCOLS` | Wrap to columns | Yes |
60
+ | `WRAPROWS` | Wrap to rows | Yes |
61
+ | `TOCOL` | Convert to column | Yes |
62
+ | `TOROW` | Convert to row | Yes |
63
+
64
+ *XLOOKUP spills when returning multiple columns
65
+
66
+ ### Spill Range Reference
67
+ ```excel
68
+ =A1# // Reference entire spill range from A1
69
+ =ROWS(A1#) // Count rows in spill range
70
+ =COLUMNS(A1#) // Count columns in spill range
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Best Practices
76
+
77
+ ### 1. Use LET for Complex Formulas
78
+ ```excel
79
+ // BAD: Repeated calculations
80
+ =IF(SUM(A:A)>1000, SUM(A:A)*0.1, SUM(A:A)*0.05)
81
+
82
+ // GOOD: Calculate once with LET
83
+ =LET(
84
+ total, SUM(A:A),
85
+ rate, IF(total > 1000, 0.1, 0.05),
86
+ total * rate
87
+ )
88
+ ```
89
+
90
+ ### 2. Use Structured References with Tables
91
+ ```excel
92
+ // BAD: Cell references
93
+ =SUM(B2:B100)
94
+
95
+ // GOOD: Table references (auto-expand)
96
+ =SUM(tbl_Sales[Amount])
97
+
98
+ // Specific row in current row
99
+ =[@Amount] * [@Quantity]
100
+
101
+ // Entire column except headers
102
+ =AVERAGE(tbl_Sales[Price])
103
+
104
+ // Headers only
105
+ =tbl_Sales[[#Headers],[Amount]]
106
+ ```
107
+
108
+ ### 3. Error Handling
109
+ ```excel
110
+ // IFERROR - Catch all errors
111
+ =IFERROR(A1/B1, 0)
112
+
113
+ // IFNA - Only catch #N/A (better for lookups)
114
+ =IFNA(XLOOKUP(A1, tbl_Products[ID], tbl_Products[Name]), "Not Found")
115
+
116
+ // LET with error check
117
+ =LET(
118
+ result, XLOOKUP(A1, range1, range2),
119
+ IF(ISNA(result), "Not Found", result)
120
+ )
121
+ ```
122
+
123
+ ### 4. Avoid Volatile Functions
124
+ ```excel
125
+ // VOLATILE (recalculate always) - Use sparingly
126
+ INDIRECT() // Avoid when possible
127
+ OFFSET() // Use INDEX instead
128
+ NOW() // Use sparingly
129
+ TODAY() // OK for date comparisons
130
+ RAND() // OK when randomness needed
131
+ RANDARRAY() // OK when randomness needed
132
+
133
+ // NON-VOLATILE alternatives
134
+ OFFSET(A1,1,0) → INDEX(A:A, ROW(A1)+1)
135
+ INDIRECT("A"&B1) → INDEX(A:A, B1)
136
+ ```
137
+
138
+ ---
139
+
140
+ ## Common Patterns
141
+
142
+ ### XLOOKUP (Modern Lookup)
143
+ ```excel
144
+ // Basic lookup
145
+ =XLOOKUP(lookup_value, lookup_array, return_array)
146
+
147
+ // With default if not found
148
+ =XLOOKUP(A1, tbl_Products[ID], tbl_Products[Name], "Not Found")
149
+
150
+ // Return multiple columns
151
+ =XLOOKUP(A1, tbl_Products[ID], tbl_Products[[Name]:[Price]])
152
+
153
+ // Approximate match (sorted data)
154
+ =XLOOKUP(A1, tbl_Tax[Threshold], tbl_Tax[Rate], , 1)
155
+
156
+ // Search from end (last match)
157
+ =XLOOKUP(A1, tbl_Log[ID], tbl_Log[Date], , 0, -1)
158
+
159
+ // Wildcard search
160
+ =XLOOKUP("*"&A1&"*", tbl_Products[Name], tbl_Products[ID], , 2)
161
+ ```
162
+
163
+ ### FILTER Function
164
+ ```excel
165
+ // Basic filter
166
+ =FILTER(tbl_Sales, tbl_Sales[Region]="North")
167
+
168
+ // Multiple conditions (AND)
169
+ =FILTER(tbl_Sales, (tbl_Sales[Region]="North") * (tbl_Sales[Amount]>1000))
170
+
171
+ // Multiple conditions (OR)
172
+ =FILTER(tbl_Sales, (tbl_Sales[Region]="North") + (tbl_Sales[Region]="South"))
173
+
174
+ // With default if empty
175
+ =FILTER(tbl_Sales, tbl_Sales[Amount]>10000, "No results")
176
+
177
+ // Dynamic column selection
178
+ =FILTER(CHOOSECOLS(tbl_Sales, 1, 3, 5), tbl_Sales[Status]="Active")
179
+ ```
180
+
181
+ ### SORT and SORTBY
182
+ ```excel
183
+ // Sort ascending
184
+ =SORT(A1:C10, 2) // Sort by column 2
185
+
186
+ // Sort descending
187
+ =SORT(A1:C10, 2, -1)
188
+
189
+ // Sort by multiple columns
190
+ =SORT(A1:C10, {2,3}, {1,-1}) // Col 2 asc, then col 3 desc
191
+
192
+ // Sort by external column
193
+ =SORTBY(tbl_Products, tbl_Products[Sales], -1)
194
+
195
+ // Sort by multiple external columns
196
+ =SORTBY(data, col1, 1, col2, -1)
197
+ ```
198
+
199
+ ### UNIQUE Function
200
+ ```excel
201
+ // Unique values from column
202
+ =UNIQUE(tbl_Sales[Region])
203
+
204
+ // Unique rows from range
205
+ =UNIQUE(A1:C10)
206
+
207
+ // Unique values occurring exactly once
208
+ =UNIQUE(tbl_Sales[Region], , TRUE)
209
+
210
+ // Unique by column (horizontal)
211
+ =UNIQUE(A1:E1, TRUE)
212
+ ```
213
+
214
+ ### LET with LAMBDA
215
+ ```excel
216
+ // Reusable calculation in formula
217
+ =LET(
218
+ data, tbl_Sales,
219
+ filtered, FILTER(data, data[Year]=2024),
220
+ total, SUM(INDEX(filtered, , 3)),
221
+ count, ROWS(filtered),
222
+ average, total / count,
223
+ ROUND(average, 2)
224
+ )
225
+
226
+ // Named LAMBDA (Name Manager)
227
+ // Name: CalculateBonus
228
+ // Formula: =LAMBDA(sales, rate, IF(sales > 10000, sales * rate, 0))
229
+ // Usage: =CalculateBonus(A1, 0.1)
230
+ ```
231
+
232
+ ### SEQUENCE Patterns
233
+ ```excel
234
+ // Numbers 1 to 10
235
+ =SEQUENCE(10)
236
+
237
+ // Numbers with start and step
238
+ =SEQUENCE(10, 1, 100, 5) // 100, 105, 110...
239
+
240
+ // Date sequence
241
+ =SEQUENCE(12, 1, DATE(2024,1,1), 30) // Monthly dates
242
+
243
+ // Grid of numbers
244
+ =SEQUENCE(5, 3) // 5 rows × 3 columns
245
+
246
+ // Row numbers for INDEX
247
+ =INDEX(data, SEQUENCE(ROWS(data)), 1)
248
+ ```
249
+
250
+ ### Combining Dynamic Arrays
251
+ ```excel
252
+ // Filter, sort, and take top 10
253
+ =TAKE(SORT(FILTER(tbl_Sales, tbl_Sales[Year]=2024), 3, -1), 10)
254
+
255
+ // Unique sorted values
256
+ =SORT(UNIQUE(tbl_Sales[Category]))
257
+
258
+ // Stack multiple ranges
259
+ =VSTACK(
260
+ FILTER(tbl_2023, tbl_2023[Status]="Active"),
261
+ FILTER(tbl_2024, tbl_2024[Status]="Active")
262
+ )
263
+
264
+ // Create summary with HSTACK
265
+ =HSTACK(
266
+ UNIQUE(tbl_Sales[Region]),
267
+ SUMIFS(tbl_Sales[Amount], tbl_Sales[Region], UNIQUE(tbl_Sales[Region]))
268
+ )
269
+ ```
270
+
271
+ ---
272
+
273
+ ## Aggregation Functions
274
+
275
+ ### SUMIFS / COUNTIFS / AVERAGEIFS
276
+ ```excel
277
+ // Single condition
278
+ =SUMIFS(tbl_Sales[Amount], tbl_Sales[Region], "North")
279
+
280
+ // Multiple conditions
281
+ =SUMIFS(tbl_Sales[Amount],
282
+ tbl_Sales[Region], "North",
283
+ tbl_Sales[Year], 2024)
284
+
285
+ // With operators
286
+ =SUMIFS(tbl_Sales[Amount], tbl_Sales[Date], ">="&DATE(2024,1,1))
287
+
288
+ // Wildcard
289
+ =COUNTIFS(tbl_Products[Name], "*phone*")
290
+
291
+ // Between dates
292
+ =SUMIFS(tbl_Sales[Amount],
293
+ tbl_Sales[Date], ">="&StartDate,
294
+ tbl_Sales[Date], "<="&EndDate)
295
+ ```
296
+
297
+ ### MAXIFS / MINIFS
298
+ ```excel
299
+ // Max with condition
300
+ =MAXIFS(tbl_Sales[Amount], tbl_Sales[Region], "North")
301
+
302
+ // Min with multiple conditions
303
+ =MINIFS(tbl_Sales[Price],
304
+ tbl_Sales[Category], "Electronics",
305
+ tbl_Sales[Stock], ">0")
306
+ ```
307
+
308
+ ---
309
+
310
+ ## Text Functions
311
+
312
+ ### TEXTSPLIT (Excel 365)
313
+ ```excel
314
+ // Split by delimiter
315
+ =TEXTSPLIT(A1, ",") // Horizontal split
316
+
317
+ // Split to rows
318
+ =TEXTSPLIT(A1, , ",") // Vertical split
319
+
320
+ // Split by multiple delimiters
321
+ =TEXTSPLIT(A1, {",", ";", " "})
322
+
323
+ // With row and column delimiters
324
+ =TEXTSPLIT("a,b;c,d", ",", ";") // 2×2 array
325
+ ```
326
+
327
+ ### TEXTJOIN
328
+ ```excel
329
+ // Join with delimiter
330
+ =TEXTJOIN(", ", TRUE, A1:A10) // TRUE = ignore empty
331
+
332
+ // Join filtered results
333
+ =TEXTJOIN(", ", TRUE, FILTER(tbl_Products[Name], tbl_Products[Category]="Books"))
334
+ ```
335
+
336
+ ### CONCAT / CONCATENATE
337
+ ```excel
338
+ // Modern: CONCAT (handles ranges)
339
+ =CONCAT(A1:A10)
340
+
341
+ // With formatting
342
+ =TEXT(A1, "mm/dd/yyyy") & " - " & B1
343
+ ```
344
+
345
+ ---
346
+
347
+ ## Date Functions
348
+
349
+ ### Common Date Calculations
350
+ ```excel
351
+ // Age in years
352
+ =DATEDIF(BirthDate, TODAY(), "Y")
353
+
354
+ // Working days between dates
355
+ =NETWORKDAYS(StartDate, EndDate)
356
+ =NETWORKDAYS.INTL(StartDate, EndDate, "0000011") // Custom weekend
357
+
358
+ // Add months
359
+ =EDATE(A1, 3) // Add 3 months
360
+
361
+ // End of month
362
+ =EOMONTH(A1, 0) // End of current month
363
+ =EOMONTH(A1, 1) // End of next month
364
+
365
+ // Start of month
366
+ =EOMONTH(A1, -1) + 1
367
+
368
+ // Quarter
369
+ =ROUNDUP(MONTH(A1)/3, 0)
370
+
371
+ // Fiscal year (starting April)
372
+ =YEAR(A1) + IF(MONTH(A1) >= 4, 0, -1)
373
+
374
+ // Week number (ISO)
375
+ =ISOWEEKNUM(A1)
376
+ ```
377
+
378
+ ---
379
+
380
+ ## Anti-Patterns
381
+
382
+ ### 1. Nested IFs (Use IFS or SWITCH)
383
+ ```excel
384
+ // BAD: Nested IFs
385
+ =IF(A1="A", 1, IF(A1="B", 2, IF(A1="C", 3, 0)))
386
+
387
+ // GOOD: IFS
388
+ =IFS(A1="A", 1, A1="B", 2, A1="C", 3, TRUE, 0)
389
+
390
+ // GOOD: SWITCH
391
+ =SWITCH(A1, "A", 1, "B", 2, "C", 3, 0)
392
+ ```
393
+
394
+ ### 2. VLOOKUP Limitations
395
+ ```excel
396
+ // BAD: VLOOKUP (fragile column index)
397
+ =VLOOKUP(A1, B:E, 3, FALSE)
398
+
399
+ // GOOD: XLOOKUP (explicit return column)
400
+ =XLOOKUP(A1, B:B, D:D)
401
+
402
+ // GOOD: INDEX/MATCH (flexible)
403
+ =INDEX(D:D, MATCH(A1, B:B, 0))
404
+ ```
405
+
406
+ ### 3. Entire Column References in Tables
407
+ ```excel
408
+ // BAD: Can cause performance issues
409
+ =SUMIF(A:A, "Criteria", B:B)
410
+
411
+ // GOOD: Use table references
412
+ =SUMIF(tbl_Data[Category], "Criteria", tbl_Data[Amount])
413
+
414
+ // GOOD: Use explicit ranges
415
+ =SUMIF(A1:A10000, "Criteria", B1:B10000)
416
+ ```
417
+
418
+ ### 4. Hardcoded Values
419
+ ```excel
420
+ // BAD: Hardcoded
421
+ =A1 * 0.21
422
+
423
+ // GOOD: Named range
424
+ =A1 * TaxRate
425
+
426
+ // GOOD: Cell reference with label
427
+ =A1 * $B$1 // Where B1 contains tax rate
428
+ ```
429
+
430
+ ---
431
+
432
+ ## Performance Tips
433
+
434
+ 1. **Use Tables** - Auto-expand, structured references, better performance
435
+ 2. **Avoid Volatile Functions** - INDIRECT, OFFSET slow down workbooks
436
+ 3. **Use Helper Columns** - Break complex formulas into steps
437
+ 4. **Limit Array Size** - Large spill ranges impact performance
438
+ 5. **Use XLOOKUP over VLOOKUP** - More efficient, clearer syntax
439
+ 6. **Filter Before Aggregate** - Reduce data before calculations
440
+
441
+ ---
442
+
443
+ ## Complexity Adaptation
444
+
445
+ Adjust depth based on `config.json → experienceLevel`:
446
+ - **beginner**: Step-by-step with explanations, reference library examples
447
+ - **intermediate**: Standard depth, explain non-obvious decisions
448
+ - **advanced**: Concise, skip basics, focus on edge cases and optimization
449
+
450
+ ## Related Skills
451
+
452
+ - `/fast-standard` — FAST spreadsheet modeling standard
453
+ - `/data-quality` — Validate Excel data
454
+
455
+ ---
456
+
457
+ ## Related Resources
458
+
459
+ - [Snippets: Lookups](../../snippets/excel-formulas/lookups.md)
460
+ - [Snippets: Dynamic Arrays](../../snippets/excel-formulas/dynamic-arrays.md)
461
+ - [Snippets: Aggregations](../../snippets/excel-formulas/aggregations.md)
462
+ - [Snippets: Dates and Times](../../snippets/excel-formulas/dates-and-times.md)
463
+ - [Snippets: Text Functions](../../snippets/excel-formulas/text-functions.md)