# Tabular Editor

### 官方文档

在学习一些其他技巧之前，建议先查看下官方文档，熟悉下常规的使用

{% embed url="<https://docs.tabulareditor.com/te2/Getting-Started.html>" %}

### 下载

{% embed url="<https://github.com/TabularEditor/TabularEditor/releases>" %}

### 查找空值

如果有空值，运行后会显示相应的表及空值数，

![](https://3572298152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FejUS62GqbuzPikm5Ra5G%2Fuploads%2FibFggtaJ7j4RymMBdgRw%2Fimage.png?alt=media\&token=206812f7-e07e-49dc-a2c5-1cc664d99d91)

```csharp
var sb = new System.Text.StringBuilder();
string newline = Environment.NewLine;

sb.Append("FromTable" + '\t' + "ToTable" + '\t' + "BlankRowCount" + newline);

foreach (var r in Model.Relationships.ToList())
{
    bool   act = r.IsActive;
    string fromTable = r.FromTable.Name;
    string toTable = r.ToTable.Name;
    string fromTableFull = r.FromTable.DaxObjectFullName;    
    string fromObject = r.FromColumn.DaxObjectFullName;
    string toObject = r.ToColumn.DaxObjectFullName;
    string dax;
    
    if (act)
    {
        dax = "SUMMARIZECOLUMNS(\"test\",CALCULATE(COUNTROWS("+fromTableFull+"),ISBLANK("+toObject+")))";
    }
    else
    {
        dax = "SUMMARIZECOLUMNS(\"test\",CALCULATE(COUNTROWS("+fromTableFull+"),USERELATIONSHIP("+fromObject+","+toObject+"),ISBLANK("+toObject+")))";
    }
    
    var daxResult = EvaluateDax(dax);
    string blankRowCount = daxResult.ToString();
    
    if (blankRowCount != "Table")
    {
        sb.Append(fromTable + '\t' + toTable + '\t' + blankRowCount + newline);        
    }
}

sb.Output();
```

#### 参考

<https://www.elegantbi.com/post/findblankrows>

<https://www.wolai.com/muxiaoqi/dyJZkdt8iUrLHDmNybD3xy>
