列匹配条件时如何显示行?
How to show rows when column match criteria?
当 column = fruits 包含字符串 apple
时,如何定义度量来设置条件以显示苹果的值?
我试过了,但我只看到查询批处理完成但有错误。
MEASURE Table1[apples] = IF(SEARCH("apple",'Table1'[Fruits]),"Yes","No")
假设您想要 return 对 'Table1'[Fruits]
列包含字符串 "apple" 的那些行的列 'Table1'[Value]
求和,您应该使用:
MEASURE Table1[apples] =
CALCULATE (
SUM ( 'Table1'[Value] ),
KEEPFILTERS(
SEARCH ( "apple", 'Table1'[Fruits], 1, 0 ) <> 0
)
)
当 column = fruits 包含字符串 apple
时,如何定义度量来设置条件以显示苹果的值?
我试过了,但我只看到查询批处理完成但有错误。
MEASURE Table1[apples] = IF(SEARCH("apple",'Table1'[Fruits]),"Yes","No")
假设您想要 return 对 'Table1'[Fruits]
列包含字符串 "apple" 的那些行的列 'Table1'[Value]
求和,您应该使用:
MEASURE Table1[apples] =
CALCULATE (
SUM ( 'Table1'[Value] ),
KEEPFILTERS(
SEARCH ( "apple", 'Table1'[Fruits], 1, 0 ) <> 0
)
)