![](/img/trans.png)
[英]How can I create a new table of data in Power BI from a different query that updates daily?
[英]How can I create a new table in Power BI from three columns of another table with a filter?
我有一个表,索引列有重复值,第三列只有某些行有值
我现在有的表:
我的目标是创建一个新表,该表选择 CompanyID、Start Date 和 Contact Date 列,但从这些列中排除具有空白值的行
我想要的新表:
我使用了以下 DAX 代码:
CALCULATETABLE (
Table,
FILTER ( Table, NOT ( ISBLANK ( Table[Start Date] ) ) )
)
此代码的问题在于它选择了我原始数据的所有 350 多列,而不仅仅是我想要的 3 列。 此外,我不知道如何添加额外的过滤器,所以我没有联系日期和 ComapanyID 的空白行
我也试过下面的代码,但它不起作用
CALCULATETABLE (
Table,
FILTER ( Table, NOT ( ISBLANK ( Table[Start Date] ) ) ),
FILTER ( Table, NOT ( ISBLANK ( Table[Order Date] ) ) ),
FILTER ( Table, NOT ( ISBLANK ( Table[Employee Count] ) ) )
)
SELECTCOLUMNS 函数允许您选择特定的列。
例如:
New Filtered Table =
EVALUATE
SELECTCOLUMNS (
CALCULATETABLE (
Table,
NOT ( ISBLANK ( Table[Start Date] ) ),
NOT ( ISBLANK ( Table[Order Date] ) ),
NOT ( ISBLANK ( Table[Employee Count] ) )
),
"CompanyID", Table[CompanyID],
"Contact Date", Table[Contact Date],
"Start Date", Table[Start Date]
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.