根据不在汇总 "DAX" 中的列进行过滤
Filter based on column which is not in summarize "DAX"
今天我想根据以下 "DAX" 查询生成结果,但是 return 出现错误。
evaluate
(
filter
(
summarize
(
'Date',
'Date'[Numeric Month]
),
AND ('Date'[Numeric Month] >=(YEAR(TODAY())-1)* 100 + 1,'Date'[NumericDate] <=TODAY())
)
)
错误:
Query (11, 60) A single value for column 'Numeric Date' in table 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
我尝试了各种 expect
ADDCOLUMNS,SUMMARIZE
但这没有任何作用。我只想输出 ('Date'[Numeric Month])。
我不确定你在这里试图达到什么目的。只想要不同的数字月份作为输出?如果是,请执行此操作:
EVAULATE(
VALUES('Date'[Numeric Month])
)
否则,您应该将 Date'[NumericDate] <=TODAY() 移动到迭代器,因此将 FILTER 作为第一个参数传递给 summarize
evaluate
(
filter
(
summarize
(
filter('Date',
'Date'[NumericDate] <=TODAY()
)
'Date'[Numeric Month]
),
'Date'[Numeric Month] >=(YEAR(TODAY())-1)* 100 + 1
)
)
今天我想根据以下 "DAX" 查询生成结果,但是 return 出现错误。
evaluate
(
filter
(
summarize
(
'Date',
'Date'[Numeric Month]
),
AND ('Date'[Numeric Month] >=(YEAR(TODAY())-1)* 100 + 1,'Date'[NumericDate] <=TODAY())
)
)
错误:
Query (11, 60) A single value for column 'Numeric Date' in table 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
我尝试了各种 expect
ADDCOLUMNS,SUMMARIZE
但这没有任何作用。我只想输出 ('Date'[Numeric Month])。
我不确定你在这里试图达到什么目的。只想要不同的数字月份作为输出?如果是,请执行此操作:
EVAULATE(
VALUES('Date'[Numeric Month])
)
否则,您应该将 Date'[NumericDate] <=TODAY() 移动到迭代器,因此将 FILTER 作为第一个参数传递给 summarize
evaluate
(
filter
(
summarize
(
filter('Date',
'Date'[NumericDate] <=TODAY()
)
'Date'[Numeric Month]
),
'Date'[Numeric Month] >=(YEAR(TODAY())-1)* 100 + 1
)
)