桥接表 - DAX 还是 M? [英] Bridge tables - DAX or M?
问题描述
我们应该使用 DAX 还是 M 构建桥接表?
Should we construct bridge tables with DAX or M?
图片从这里
使用 DAX 似乎很诱人.使用 DAX,代码简洁明了:
It seems very tempting to use DAX. With DAX the code is short and clear:
IDList = DISTINCT(
UNION(
DISTINCT(Table1[ID])
,DISTINCT(Table2[ID])
))
此外,DAX 表不需要加载为 M 表.但是我想知道 DAX 相对于 M 的优势是否不是虚幻的?M 似乎只加载一次,而 DAX 似乎是在运行中计算的,可能在任何时候,一遍又一遍?
Moreover, DAX tables do not need to be loaded as M tables. However I wonder if advantage of DAX over M is not illusory? M seems to load once and DAX seems to be calculated on the fly, maybe anytime, over and over?
推荐答案
如果它从中提取数据的任何表以任何方式刷新或更新,则将重新计算 DAX 计算表.(来自 https://docs.microsoft.com/en-us/power-bi/desktop-calculated-tables )
DAX calculated tables are re-calculated if any of the tables it pulls data from are refreshed or updated in any way. (from https://docs.microsoft.com/en-us/power-bi/desktop-calculated-tables )
它们不会即时"重新计算,也不会一遍又一遍"地重新计算.Power BI 数据模型的刷新周期在使用 DAX 计算表或 M 查询表之间没有区别.但是,您可能会发现 DAX 计算表的刷新速度比 M 快,具体取决于表的复杂性...
They're not re-calculated "on the fly", nor "over and over". There's no difference to the refresh cycle of your Power BI data model, between using a DAX calculated table or an M query table. You may however find that DAX calculated tables refresh faster than M, depending on the complexity of the table...
这篇关于桥接表 - DAX 还是 M?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!