如何复制在 DAX 中创建的 table 以用于 Power Query 以进行转换?

How to Duplicate a table created in DAX to be used in Power Query in order to make transformations?

我正在寻找已在 DAX 中分组的 table:

Quality Table = 
    SUMMARIZECOLUMNS(
        'Knitting Defects with Machine'[Knitting Machine ],
        'Knitting Defects with Machine'[Knit Date],
        'Knitting Defects with Machine'[Defect Description],
        'Knitting Defects with Machine'[Defect Code],
        "Defect Percentage", [Defect Percentage],
        "Defect Quantity", [Defect Quantity],
        "Machine Total", [Machine Total]
    )

并将其导入 Power Query。我知道我可以在 Power Query 中分组,但我总结了三个重要的措施,我无法在 Power Query 中重新创建。

缺陷百分比 = 缺陷数量(代码以 5 开头)/机器总数

缺陷百分比

= VAR Percentage = DIVIDE( [Defect Quantity] , [Machine Total] )
RETURN 

if( Percentage <.1, blank(), Percentage )

缺陷数量

= CALCULATE(
    SUMX( 'Knitting Defects with Machine',
        'Knitting Defects with Machine'[Processed Qty]),
        left('Knitting Defects with Machine'[Defect Code])="5"
)

机器总数:

= CALCULATE (
    SUMX (
        'Knitting Defects with Machine',
        'Knitting Defects with Machine'[Processed Qty]
    ),
    ALLEXCEPT (
        'Knitting Defects with Machine',
        'Knitting Defects with Machine'[Knitting Machine ],
        'Calendar'[Date]
    )
)

这是我当前在 DAX 中输出的图片:

我需要在 Power Query 中获得这个输出,因为我必须从那里做很多事情:逆透视到 description/value 行,然后合并相似但不同的 table 相关的机器.除非我可以在 DAX 中完成所有操作?

无法将计算表反馈回查询编辑器(除非您先将它们作为中间步骤以某种方式导出到文件)。

完全在 M 中或完全在 DAX 中完成所有必要的转换可能是可能的,但找出最佳前进方式取决于您的特定模型的细节。