我有这个数据集,它由两个切片器(实践名称和项目名称)过滤。之后我创建了两个措施来获取最新发布日期和最新发布名称的版本。
Last Release Date =
MAXX(
ALLSELECTED(test_execution_summary),
test_execution_summary[Executed On]
)
Last Release Name =
CALCULATE(
MAX(test_cycle_details[Version]),
FILTER(
ALLSELECTED(test_execution_summary),
test_execution_summary[Executed On]=[Last Release Date]
)
)
对于报告中的表格,需要显示与所选发布版本相关的周期详细信息,我正在使用下面的视觉级别过滤器。
Is Latest Release Flag =
VAR LatestReleaseName = [Last Release Name]
RETURN
if (MAX(test_cycle_details[Version])=LatestReleaseName, 1, 0)
我的桌子如下。
现在我需要获取每一列的总数(测试用例数、错误数、重新打开数)作为单独的卡片。我尝试将用于列的度量添加到卡片中。但它只是给出了与整个项目相关的总数。我如何对这些总数应用是最新版本标志的过滤。我尝试创建新的度量来计算总计...但我不知道如何在过滤条件中应用该度量。下面尝试过,但输出为空白。
Total TestCase Count =
COUNTX(VALUES(test_execution_summary[Issue Key]),
IF(MAX(test_cycle_details[Version])=[Last Release Name], 1)
)
这个措施奏效了。
Total TestCase Count =
CALCULATE(
COUNTROWS(test_execution_summary),
FILTER(
test_cycle_details,
test_cycle_details[Version] = [Last Release Name]
)
)