在Power BI中,我的数据中有一些重复的条目,其中只有一列不同,这是一个“详细信息”列。
Name   | Value | Details
Item 1 | 10    | Feature 1
Item 1 | 10    | Feature 2
Item 2 | 15    | Feature 1
Item 3 | 7     | Feature 1
Item 3 | 7     | Feature 2
Item 3 | 7     | Feature 3我知道这是数据结构的问题,但它不能改变。
基本上,当我对Power BI卡上的值列求和时,我只希望它对每个唯一的名称求和,因此在本例中:
Total = 10 + 15 + 7 我将在矩阵中使用详细信息,因此不能简单地从查询编辑器中删除重复项。
有没有办法用DAX公式过滤?只是对第一次出现的项求和吗?
发布于 2021-03-28 21:54:38
这一定会有帮助
Table = SUMMARIZE(Sheet2,Sheet2[Item],"Sales Quantity",SUM(Sheet2[Sales Quantiy]),"Purchase Quantity",CALCULATE(SUMX(DISTINCT(Sheet2[Purchase Quantity]),FIRSTNONBLANK(Sheet2[Purchase Quantity],0))))https://stackoverflow.com/questions/43547620
复制相似问题