Table of Contents

列的唯一值

脚本用途

显示某列的去重值,便于快速进行数据概览和查阅。可在列级别将其另存为宏,方便快速调用。



脚本

脚本标题

// Construct the DAX expression to get all distinct column values, from the selected column:
var dax = string.Format("ALL({0})", Selected.Column.DaxObjectFullName);

// Evaluate the DAX expression against the connected model:
var result = EvaluateDax(dax);

// Output the DataTable containing the result of the DAX expression:
Output(result);

说明

该脚本对所选列应用 ALL() DAX 函数,并在输出对话框中显示结果。