DAX Lib — index of published DAX UDFs
Before authoring a UDF from scratch, check here — someone may have already shipped it.
This is an offline index of DAX Lib, the package registry for DAX
user-defined functions. It tells you what exists, who wrote it and what it does, so the agent
can answer "does this already exist?" without a network round trip.
It does not carry the DAX code. The code lives at the registry, which is where it stays
current. See NOTICE.
Pairs with dax-lib-install (actually install what this index found),
dax-udf-authoring (how to write your own when none fits), and
dax-reference (what the built-in functions do).
Files
| File |
Use |
catalog.md |
Human index — one row per package: id, latest version, author, functions, description. Scan this first. |
catalog.json |
Machine index — every version, with functions[], tags[], isLatest, url. Use for keyword/tag search. |
refresh-daxlib.ps1 |
Rebuilds the index from daxlib/daxlib. Maintainer tool: it lives in the repository, not in the plugin. |
Workflow
- Identify the need — "trailing moving average", "waterfall SVG", "RFM segmentation".
- Search the index. Grep
catalog.md, or query catalog.json by tags / functions /
description. Tags are coarse (DAX,UDF,SVG,TIMESERIES,…) — match on description and
function names too.
- Report what you found: package id, author, the function signature from
functions[],
and the url to its source. Say plainly that the code has to come from the registry.
- If the user wants it installed, not just documented, route to
dax-lib-install — do not fetch, paste, or install the code yourself.
That skill owns the fetch, the license check, the install, and the attribution.
- If nothing fits, say so and route to
dax-udf-authoring.
Example
Need: trailing N-period moving average over a dynamic date column.
catalog.json → id "TimeSeries.MovingAverage" (latest 0.1.1), tags TIMESERIES,
functions: Simple, Weighted, LinearWeighted, Exponential, DoubleExponential,
Triangular, Geometric
url → https://github.com/daxlib/daxlib/tree/main/packages/t/timeseries.movingaverage
TimeSeries.MovingAverage.Simple( dateColumn, timeSeriesTable, lookbackPeriods, expression )
is built on native WINDOW (see dax-window-functions), which is generally cheaper than a
hand-rolled TOPN + CALCULATETABLE. It needs a fixed date column, so it does not fit a model
whose grain is a dynamic period axis.
Refresh
A maintainer step, run from a clone of
the repository — the script is not part
of the installed plugin: scripts/dax-lib/refresh-daxlib.ps1.
It shallow-clones daxlib/daxlib@main, reads each package's manifest.daxlib, parses the function
names out of its functions.tmdl, and rewrites catalog.json + catalog.md stamped with the
upstream commit. It keeps no .tmdl file.
Why a script and not WebFetch: daxlib.org is a JavaScript SPA — a plain HTTP GET returns the
empty app shell. GitHub is the source of truth.
Notes
- The index is a snapshot; the registry is live. Check
source in catalog.json for how old it
is, and prefer the registry when a version matters.
- All versions are indexed (
isLatest flags the newest per package). Prefer the latest unless
reproducing a specific one.
- Some
manifest.daxlib files still point their $schema at the old sql-bi/daxlib path — the
repo was renamed to daxlib/daxlib. Harmless.
- Licensing varies per author. The upstream repo is MIT, but individual packages declare no
license of their own — check the package before reusing its code in a product.
1---2name: dax-lib3description: Use when about to write a DAX UDF, to check whether one is already published on DAX Lib (daxlib.org) — moving averages, format strings, SVG visuals, KPI/variance, RFM/ABC classification, unit conversion, model metadata, sample data. Offline index — what exists, who wrote it, where to get it. Triggers on "is there a UDF for", "existing DAX UDF", "daxlib", "DAX Lib package".4metadata:5 source: https://skillmd.com/skills/csalcedodatabi/dax-lib6---78# DAX Lib — index of published DAX UDFs910**Before authoring a UDF from scratch, check here — someone may have already shipped it.**1112This is an **offline index** of [DAX Lib](https://daxlib.org), the package registry for DAX13user-defined functions. It tells you what exists, who wrote it and what it does, so the agent14can answer "does this already exist?" without a network round trip.1516**It does not carry the DAX code.** The code lives at the registry, which is where it stays17current. See [`NOTICE`](./NOTICE.md).1819Pairs with **`dax-lib-install`** (actually install what this index found),20**`dax-udf-authoring`** (how to write your own when none fits), and21**`dax-reference`** (what the built-in functions do).2223## Files2425| File | Use |26|---|---|27| [`catalog.md`](./catalog.md) | Human index — one row per package: id, latest version, author, functions, description. **Scan this first.** |28| [`catalog.json`](./catalog.json) | Machine index — every version, with `functions[]`, `tags[]`, `isLatest`, `url`. Use for keyword/tag search. |29| [`refresh-daxlib.ps1`](https://github.com/CSalcedoDataBI/dax-for-agents/blob/main/scripts/dax-lib/refresh-daxlib.ps1) | Rebuilds the index from `daxlib/daxlib`. Maintainer tool: it lives in the repository, not in the plugin. |3031## Workflow32331. **Identify the need** — "trailing moving average", "waterfall SVG", "RFM segmentation".342. **Search the index.** Grep `catalog.md`, or query `catalog.json` by `tags` / `functions` /35 `description`. Tags are coarse (`DAX,UDF,SVG,TIMESERIES,…`) — match on description and36 function names too.373. **Report what you found**: package id, author, the function signature from `functions[]`,38 and the `url` to its source. Say plainly that the code has to come from the registry.394. **If the user wants it installed**, not just documented, route to40 **`dax-lib-install`** — do not fetch, paste, or install the code yourself.41 That skill owns the fetch, the license check, the install, and the attribution.425. **If nothing fits**, say so and route to `dax-udf-authoring`.4344## Example4546```47Need: trailing N-period moving average over a dynamic date column.48catalog.json → id "TimeSeries.MovingAverage" (latest 0.1.1), tags TIMESERIES,49 functions: Simple, Weighted, LinearWeighted, Exponential, DoubleExponential,50 Triangular, Geometric51url → https://github.com/daxlib/daxlib/tree/main/packages/t/timeseries.movingaverage52```5354`TimeSeries.MovingAverage.Simple( dateColumn, timeSeriesTable, lookbackPeriods, expression )`55is built on native `WINDOW` (see **`dax-window-functions`**), which is generally cheaper than a56hand-rolled `TOPN + CALCULATETABLE`. It needs a fixed date column, so it does not fit a model57whose grain is a dynamic period axis.5859## Refresh6061A maintainer step, run from a clone of62[the repository](https://github.com/CSalcedoDataBI/dax-for-agents) — the script is not part63of the installed plugin: `scripts/dax-lib/refresh-daxlib.ps1`.6465It shallow-clones `daxlib/daxlib@main`, reads each package's `manifest.daxlib`, parses the function66names out of its `functions.tmdl`, and rewrites `catalog.json` + `catalog.md` stamped with the67upstream commit. **It keeps no `.tmdl` file.**6869**Why a script and not WebFetch:** daxlib.org is a JavaScript SPA — a plain HTTP GET returns the70empty app shell. GitHub is the source of truth.7172## Notes7374- The index is a snapshot; the registry is live. Check `source` in `catalog.json` for how old it75 is, and prefer the registry when a version matters.76- All versions are indexed (`isLatest` flags the newest per package). Prefer the latest unless77 reproducing a specific one.78- Some `manifest.daxlib` files still point their `$schema` at the old `sql-bi/daxlib` path — the79 repo was renamed to `daxlib/daxlib`. Harmless.80- **Licensing varies per author.** The upstream repo is MIT, but individual packages declare no81 license of their own — check the package before reusing its code in a product.