Database 累计销售指标-筛选(全部(';日期';),';日期';[Date]<;=MAX(';日期';[Date]))
我是power BI的初学者,我需要这方面的帮助。 Power BI中此功能的含义是什么(结果是什么)以及它是如何工作的Database 累计销售指标-筛选(全部(';日期';),';日期';[Date]<;=MAX(';日期';[Date])),database,reporting-services,powerbi,dax,Database,Reporting Services,Powerbi,Dax,我是power BI的初学者,我需要这方面的帮助。 Power BI中此功能的含义是什么(结果是什么)以及它是如何工作的 FILTER ( ALL('Date'), 'Date'[Date] <= MAX('Date'[Date] )) FILTER(ALL('Date'),'Date'[Date]首先,下面的表达式返回一个表,然后您可以这样读取它: Table = FILTER ( /*Take all the date in Date table*/
FILTER ( ALL('Date'), 'Date'[Date] <= MAX('Date'[Date] ))
FILTER(ALL('Date'),'Date'[Date]首先,下面的表达式返回一个表,然后您可以这样读取它:
Table =
FILTER (
/*Take all the date in Date table*/
ALL ( 'Date' );
/* Then return all the date passing this condition*/
'Date'[Date]<= **MAX ( 'Date'[Date] )
enter code here
/*Whereas MAX ( 'Date'[Date] ) is evaluating in the current filter context */
表格=
滤器(
/*在日期表中记下所有日期*/
全部(‘日期’);
/*然后返回通过此条件的所有日期*/
“Date”[Date]函数将一个表作为它的第一个参数,遍历每一行,检查作为第二个参数给出的表达式是true还是false,并返回仅包含表达式计算结果为true()
的行的表
ALL
函数删除所有筛选器和行上下文,以返回指定的整个表。如果没有此项,则将筛选作为第一个参数的日期表。在这种情况下,您需要全部内容
相反,MAX
是在本地筛选器上下文中计算的,因此MAX('Date'[Date])
返回该上下文中的最新日期,该日期不一定与整个表中的最新日期相同
因此,要获取累积销售度量值,您可以使用MAX
在筛选上下文中获取最新日期,然后筛选日期表,以包括该日期之前及之后的所有日期
Table =
FILTER (
/*Take all the date in Date table*/
ALL ( 'Date' );
/* Then return all the date passing this condition*/
'Date'[Date]<= **MAX ( 'Date'[Date] )
enter code here
/*Whereas MAX ( 'Date'[Date] ) is evaluating in the current filter context */