Powerbi 计算不包括零的平均值忽略幂bi中度量值的切片器
我正在创建以下度量,计算所有学生的平均分数,不包括零分Powerbi 计算不包括零的平均值忽略幂bi中度量值的切片器,powerbi,Powerbi,我正在创建以下度量,计算所有学生的平均分数,不包括零分 measure= calculate(average(table[score]),filter(table, table[score]<>0)) measure=计算(平均值(表[score]),筛选(表,表[score]0)) 但是,我想使用切片器将此度量与选定的学生分数进行比较 new measure= calculate(average(table[score]),all(table[student]),filter(
measure= calculate(average(table[score]),filter(table, table[score]<>0))
measure=计算(平均值(表[score]),筛选(表,表[score]0))
但是,我想使用切片器将此度量与选定的学生分数进行比较
new measure= calculate(average(table[score]),all(table[student]),filter(table, table[score]<>0))
new measure=calculate(平均值(表[score])、all(表[student])、filter(表,表[score]0))
但是,新的测量值与学生的分数相同,并且没有忽略切片器。您应该使用
AVERAGEX
和IF
计算平均值,根据某些条件排除一些记录
new measure= calculate(average(table[score]),all(table[student]),filter(table, table[score]<>0))
Average Excluding Zero =
AVERAGEX (
Table,
IF ( Table[Score] <> 0, Table[Score] )
)
您应该使用
AVERAGEX
和IF
来计算基于某些条件排除某些记录的平均值
Average Excluding Zero =
AVERAGEX (
Table,
IF ( Table[Score] <> 0, Table[Score] )
)
一般来说,没有办法让度量忽略特定的切片器 还有一些其他选择:
ALL()
函数。这样,度量将忽略所有过滤器一般来说,没有办法让度量忽略特定的切片器 还有一些其他选择:
ALL()
函数。这样,度量将忽略所有过滤器