在Spotfire中对其他变量进行分组

问题描述

我有每位用户的报告查看数据以及分别查看该报告的日期,并想计算新用户的数量(即,当月首次访问报告的用户,本例为2020年10月)查看每个报告。

User Report Date Accessed
1     X     01/09/2020
1     X     01/10/2020
1     Y     02/10/2020
2     X     01/10/2020
2     X     02/10/2020
2     Y     03/10/2020

想要达到这一点:

Report  New Users
X        1
Y        2

尝试以下代码,但我意识到User上的聚合逻辑出了点问题。我已经在交叉表中将“报告”作为汇总列:

UniqueCount(If(Min[Date Accessed] over [User]>=Date(Year(Today()),Month(today()),1),[User]))

谢谢!

解决方法

您可以使用

If(Rank(Baserowid(),“ asc”,[User],[Report])= 1,1,0)

作为数据中的计算列。

并创建一个交叉表,按月显示该列的总和。

enter image description here

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...