Token导航 LogoToken导航

Agent Skill · 待分类

dax-mastery(掌握达克斯)

dax-mastery 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dax-mastery 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 6,740。

总安装 423周安装 18GitHub Stars 33下载 148核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dax-mastery(掌握达克斯)
来源仓库:https://github.com/josiahsiegel/claude-plugin-marketplace
仓库路径:skills/dax-mastery
安装命令:
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill dax-mastery
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill dax-mastery

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

dax-mastery 提供 Power BI 专属 DAX 表达式语言完整参考。涵盖行上下文、筛选上下文、CALCULATE 函数与时间智能等核心概念。包含迭代器函数、表格运算与性能调优策略,适用于复杂度量值开发。支持 RLS 过滤器与安全角色配置指导,强化数据治理实践。

学习时应结合实际数据集练习,避免仅记忆语法而忽略语义理解。

来源仓库内路径:skills/dax-mastery

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

dax-mastery 怎么安装?

在终端执行 npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill dax-maste…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dax-mastery 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dax-mastery 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

dax-mastery 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dax-mastery 用的人多吗?

公开数据是累计安装 423 次,近一周安装 18 次,下载 148 次,GitHub 33 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dax-mastery 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
dax-mastery

掌握达克斯 · 本页

42333只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

DAX (Data Analysis Expressions) Mastery

Overview

Complete DAX reference covering evaluation contexts, CALCULATE, time intelligence, iterators, table functions, performance optimization, and advanced patterns. DAX is the formula language for Power BI measures, calculated columns, calculated tables, and RLS filters.

Evaluation Contexts

Row Context

  • Created by: Calculated columns, iterators (SUMX, FILTER, AVERAGEX, etc.), row-by-row evaluation
  • Each row in the table has its own row context
  • Access columns directly: Sales[Amount]
  • Nested iterators create nested row contexts

Filter Context

  • Created by: Slicers, visual filters, page filters, report filters, CALCULATE arguments
  • Determines which rows are visible to aggregation functions
  • Does NOT provide row-level access (cannot use Sales[Amount] directly in a measure without aggregation)

Context Transition

  • CALCULATE converts row context into filter context
  • Happens when a measure is referenced inside an iterator
  • Each row's column values become filter arguments
// Context transition example:
Sales Amount = SUM(Sales[Amount])

// Inside SUMX, each row triggers context transition:
Weighted Amount =
SUMX(
    Products,
    Products[Weight] * [Sales Amount]  // [Sales Amount] triggers CALCULATE internally
)

CALCULATE - The Most Important Function

CALCULATE(<expression>, <filter1>, <filter2>, ...)

Filter argument types:

TypeExampleBehavior
Boolean (table filter)Products[Color] = "Red"Adds filter, keeps existing context
Table expressionFILTER(ALL(Products), Products[Price] > 100)Replaces filter on affected columns
REMOVEFILTERSREMOVEFILTERS(Products[Color])Removes existing filter on column
ALLALL(Products)Removes all filters on table
KEEPFILTERSKEEPFILTERS(Products[Color] = "Red")Intersects with existing filter
USERELATIONSHIPUSERELATIONSHIP(Sales[ShipDate], Date[Date])Activates inactive relationship
CROSSFILTERCROSSFILTER(Sales[ProductID], Products[ID], Both)Changes cross-filter direction

Critical rules:

  • Boolean filters are syntactic sugar for FILTER(ALL(column), condition)
  • Boolean filters REPLACE the existing filter on that column
  • Use KEEPFILTERS to ADD to (intersect with) existing filters
  • CALCULATE modifiers (ALL, REMOVEFILTERS) execute BEFORE filter arguments

Time Intelligence Quick Reference

Prerequisite: A proper Date table marked as a date table with a continuous date column.

FunctionPurposeExample
TOTALYTDYear-to-dateTOTALYTD([Sales], Date[Date])
TOTALMTDMonth-to-dateTOTALMTD([Sales], Date[Date])
TOTALQTDQuarter-to-dateTOTALQTD([Sales], Date[Date])
SAMEPERIODLASTYEARSame period, prior yearCALCULATE([Sales], SAMEPERIODLASTYEAR(Date[Date]))
DATEADDShift by intervalCALCULATE([Sales], DATEADD(Date[Date], -1, MONTH))
PARALLELPERIODEntire shifted periodCALCULATE([Sales], PARALLELPERIOD(Date[Date], -1, QUARTER))
DATESYTDDate table filtered to YTDCALCULATE([Sales], DATESYTD(Date[Date]))
DATESBETWEENDate rangeCALCULATE([Sales], DATESBETWEEN(Date[Date], start, end))
PREVIOUSMONTHEntire previous monthCALCULATE([Sales], PREVIOUSMONTH(Date[Date]))
PREVIOUSYEAREntire previous yearCALCULATE([Sales], PREVIOUSYEAR(Date[Date]))

Common time intelligence patterns:

// Year-over-Year Growth %
YoY Growth % =
VAR CurrentSales = [Total Sales]
VAR PriorYearSales = CALCULATE([Total Sales], SAMEPERIODLASTYEAR(Date[Date]))
RETURN
    DIVIDE(CurrentSales - PriorYearSales, PriorYearSales)

// Rolling 12-Month Total
Rolling 12M =
CALCULATE(
    [Total Sales],
    DATESINPERIOD(Date[Date], MAX(Date[Date]), -12, MONTH)
)

// Moving Average (3 months)
3M Moving Avg =
AVERAGEX(
    DATESINPERIOD(Date[Date], MAX(Date[Date]), -3, MONTH),
    CALCULATE([Total Sales])
)

Variables (VAR/RETURN)

Always use variables for readability and performance:

Profit Margin % =
VAR TotalRevenue = SUM(Sales[Revenue])
VAR TotalCost = SUM(Sales[Cost])
VAR Profit = TotalRevenue - TotalCost
RETURN
    DIVIDE(Profit, TotalRevenue)

Rules:

  • Variables are evaluated once (performance benefit when reused)
  • Variables capture filter context at the point of definition
  • Variables can hold scalar values or tables
  • Use meaningful names (not x, temp)

Iterator Functions

Iterators scan a table row by row, creating row context:

FunctionPurpose
SUMXSum of expression evaluated per row
AVERAGEXAverage of expression per row
MINX / MAXXMin/Max of expression per row
COUNTXCount of non-blank expression results
RANKXRank based on expression
FILTERReturns table rows matching condition
ADDCOLUMNSAdds calculated columns to table
SELECTCOLUMNSReturns table with selected/calculated columns
GENERATECross-join with row context
// Weighted average price
Weighted Avg Price =
SUMX(
    Sales,
    Sales[Quantity] * RELATED(Products[UnitPrice])
) / SUM(Sales[Quantity])

Calculation Groups

Reduce measure sprawl by defining reusable calculation patterns:

// Instead of creating YTD, PY, YoY for EVERY measure:
// Create ONE calculation group with items:
// - Current: SELECTEDMEASURE()
// - YTD: CALCULATE(SELECTEDMEASURE(), DATESYTD(Date[Date]))
// - PY: CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR(Date[Date]))
// - YoY%: VAR Curr = SELECTEDMEASURE()
//         VAR PY = CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR(Date[Date]))
//         RETURN DIVIDE(Curr - PY, PY)

Create via Tabular Editor, TMDL view in Desktop, or TOM/.NET SDK.

Field Parameters

Enable users to dynamically switch dimensions or measures in visuals:

// Created via Modeling tab > New parameter > Fields
// Generates a calculated table:
Parameter =
{
    ("Revenue", NAMEOF(Sales[Total Revenue]), 0),
    ("Profit", NAMEOF(Sales[Total Profit]), 1),
    ("Units", NAMEOF(Sales[Total Units]), 2)
}

User-Defined Functions (September 2025 Preview)

The most significant DAX language update since variables (2015). Define reusable parameterized functions:

// Define a UDF in DAX query view or model
DEFINE
FUNCTION AddTax = (amount : NUMERIC) => amount * 1.1

// Nest UDFs
FUNCTION AddTaxAndDiscount = (amount : NUMERIC, discount : NUMERIC) =>
    AddTax(amount - discount)

EVALUATE { AddTaxAndDiscount(100, 20) }  // Returns 88

Parameter types: NUMERIC, Scalar, Table, AnyVal, AnyRef, CalendarRef, ColumnRef, MeasureRef, TableRef

Parameter modes: val (eager evaluation) or expr (lazy/context-sensitive)

Usage: Once defined and saved to the model, call UDFs from measures, calculated columns, visual calculations, and other UDFs.

Enable: File > Options > Preview features > DAX user-defined functions

Window Functions (WINDOW, INDEX, OFFSET)

DAX window functions for row-relative and range calculations:

// Running total using WINDOW
Running Total =
CALCULATE(
    [Total Sales],
    WINDOW(1, ABS, 0, REL, ALLSELECTED(Date[Month]),
        ORDERBY(Date[MonthNumber], ASC))
)

// Previous row value using OFFSET
Previous Month Sales =
CALCULATE(
    [Total Sales],
    OFFSET(-1, ALLSELECTED(Date[Month]),
        ORDERBY(Date[MonthNumber], ASC))
)

// Nth row using INDEX
First Month Sales =
CALCULATE(
    [Total Sales],
    INDEX(1, ALLSELECTED(Date[Month]),
        ORDERBY(Date[MonthNumber], ASC))
)

Key clauses:

  • ORDERBY -- sort order within the window
  • PARTITIONBY -- subset of rows (the "window" partition)
  • MATCHBY -- identify the current row in ambiguous contexts

Visual Calculations (2024-2026)

Calculations scoped to the visual matrix, not the data model:

FunctionPurpose
FIRSTValue from first row of axis
LASTValue from last row of axis
PREVIOUSValue from previous row
NEXTValue from next row
LOOKUPValue with filter (June 2025)
LOOKUPWITHTOTALSValue with filter, respects totals (June 2025)

Visual calculations are defined per-visual and do not affect the semantic model.

Calendar-Based Time Intelligence (September 2025 Preview)

Define custom calendars (fiscal, retail, 13-month, lunar) with 8 new week-based functions:

FunctionPurpose
TOTALWTDWeek-to-date running total
CLOSINGBALANCEWEEKClosing balance for the week
OPENINGBALANCEWEEKOpening balance for the week
STARTOFWEEKFirst date of current week
ENDOFWEEKLast date of current week
NEXTWEEKTable of dates for next week
PREVIOUSWEEKTable of dates for previous week
DATESWTDWeek-to-date date filter

Enable: File > Options > Preview features > Enhanced DAX Time Intelligence

Dynamic Format Strings

Apply context-dependent formatting without converting to text (GA in Desktop and Report Server Jan 2025+):

// Dynamic format string for currency
Total Sales =
SUM(Sales[Amount])

// Format string expression (set in measure properties):
// = IF(SELECTEDVALUE(Currency[Code]) = "EUR", "€#,##0.00", "$#,##0.00")

Advantage over FORMAT(): Keeps numeric data type, enabling correct chart rendering and sorting.

TABLEOF and NAMEOF (February 2026)

Reference model objects that auto-adapt to renames:

// NAMEOF returns the name of a column/measure/calendar as text
NAMEOF(Sales[Amount])  // Returns "Amount"

// TABLEOF returns a reference to the table of a column/measure
TABLEOF(Sales[Amount])  // Returns reference to Sales table

Useful inside UDFs for safer, rename-proof code.

Common Anti-Patterns

Anti-PatternProblemFix
FILTER(table,...) as CALCULATE argFull table scan, no engine optimizationUse boolean filter: column = value
Nested CALCULATEConfusing context overridesUse single CALCULATE with multiple filters
SUMX over entire table for simple sumUnnecessary iteratorUse SUM() for simple column aggregation
FORMAT() in measures for sortingReturns text, cannot sort numericallyUse separate sort column
Calculated columns for aggregationStored per row, wastes memoryUse measures instead
COUNTROWS(FILTER(table,...))Slower than CALCULATE(COUNTROWS(table), filter)Use CALCULATE with filter
Copy-pasting DAX across measuresHard to maintain, error-proneUse UDFs (preview) to define reusable logic
FORMAT() for conditional displayReturns text, breaks sorting/chartsUse dynamic format strings instead
Overusing EARLIER()Confusing, legacy patternUse VAR to capture outer context
Ignoring MATCHBY in window functionsAmbiguous row identityAlways specify MATCHBY when partition has duplicates

Additional Resources

Reference Files

  • references/dax-function-categories.md -- Complete function reference organized by category including INFO functions, window functions, and 2025-2026 additions
  • references/dax-patterns-advanced.md -- Advanced patterns: virtual relationships, dynamic segmentation, parent-child hierarchies, basket analysis

平台分布

Codex

32.55%
按下载量换算48

Claude

32.06%
按下载量换算47

Cursor

17.4%
按下载量换算26

Gemini CLI

8.8%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills