0

我需要转换使用条件语句和逻辑运算符创建的 Excel 公式。我是 Tableau 新手,无法使用下面提到的公式创建度量:

IF([p_category]="P Invoice","P Invoice",IF(AND([p_category]="Non-P Invoice",OR([P Required YN]="Y",OR([P Required YN]="Flat Y and N if weighted",[P Required YN]="Y if not intercompany"))),"Non-Accepted Non-P Invoice","Accepted Non-P Invoice"))
4

1 回答 1

1

IF/ELSE 语句不需要您成为 Tableau 专家,您只需分配一些时间来尝试一下。

公式应该类似于以下内容:

IF [p_category]='P Invoice'
THEN 'P Invoice'
ELSE (
    IF [p_category]='Non-P Invoice' AND ([P Required YN]='Y' OR ([P Required YN]='Flat Y and N if weighted' OR [P Required YN]='Y if not intercompany'))
    THEN 'Non-Accepted Non-P Invoice' ELSE 'Accepted Non-P Invoice' END
    )
END
于 2021-07-08T12:47:22.053 回答