简体   繁体   English

在 Spotfire 中对附加变量进行分组

[英]Grouping on an additional variable in Spotfire

I have data on report views per user and respective date of viewing it and would like to calculate the number of new users (ie those that accessed a report for a first time in the current month, in this case being Oct 2020) viewing each report.我有关于每个用户的报告查看次数和相应的查看日期的数据,我想计算查看每个报告的新用户数量(即当月首次访问报告的用户,在本例中为 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

Would like to get to this point:想达到这一点:

Report  New Users
X        1
Y        2

Trying with the following code but I realize there is something wrong with the aggregation logic on User.尝试使用以下代码,但我意识到 User 上的聚合逻辑有问题。 I already have Report as an aggregation column in my cross-table:我的交叉表中已经有 Report 作为聚合列:

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

Thank you!!!谢谢!!!

You can use您可以使用

If(Rank(Baserowid(),"asc",[User],[Report])=1,1,0)如果(排名(Baserowid(),“asc”,[用户],[报告])= 1,1,0)

As a calculated column in your data.作为数据中的计算列。

and create a cross table showing the sum of that column by month.并创建一个交叉表,按月显示该列的总和。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM