我正试图帮助这里的一所公立学校,但我对毕权力的知识非常有限,所以我希望你的人能让我了解这件事:
我们有一个非常简单的报表,其中有一个表和一个kpi。
Kpi计数所有学生表显示学生的成绩。
Student Math Portuguese History Science
StD A 6 6 7 8
StD B 6 7 6 7
StD C 8 9 7 8
StD D 6 6 6 6
StD E 6 7 8 8
StD F 8 6 7 7必须应用于kpi (计数(学生))和表的规则是,只有在以下情况下才显示学生:
其余的不应在表中显示或在KPI中计数。在这种情况下,我只会看到/数学生A,B,D,E&F
如有任何帮助,我们将不胜感激。
发布于 2021-12-09 14:11:51
要解决您的任务,请尝试以下操作:
isValid =
VAR cond_2_subjects = (('Table'[Math] <= 6 ) + ('Table'[Portuguese] <= 6) + ('Table'[History] <= 6) + ('Table'[Science] <= 6)) >= 2
VAR cond_portuguese = 'Table'[Portuguese] <= 6
VAR cond_math = 'Table'[Math] < 6
RETURN
-- This will check if any of the given conditions is true
IF(
cond_2_subjects || cond_portuguese || cond_math,
TRUE(),
FALSE()
)然后,该表应该如下所示:

# Students =
CALCULATE(
COUNT('Table'[Student]),
-- only count Students where conditions are true (calculated column isValid = True)
'Table'[isValid] = TRUE()
)最后的结果应该如下所示:

左边的表将'Table'[isValid] = TRUE()指定为visual上的筛选器。

https://stackoverflow.com/questions/70289945
复制相似问题