QuickSight-随时间推移的活动事件计数 [英] QuickSight - Count of active events over time
问题描述
我在QuickSight中有一个事件数据集,其中每个记录都有两个日期字段:startDate和endDate.如果T在startDate和endDate之间,则事件在时间T被认为是活动的.我想将一段时间内的活动事件可视化为折线图.但是,我正在努力了解如何在AWS QuickSight中完成此操作.有什么想法吗?
I have a event dataset in QuickSight, where each record has two date fields: startDate and endDate. An event is considered active at time T if T is between startDate and endDate. I want to build a visualization of active events over time as a line chart. However, I am struggling to understand how that can be done in AWS QuickSight. Any ideas?
推荐答案
您可以按如下所示添加计算字段活动":
You can add a calculated field "Active" as follows:
ifelse(
dateDiff(T,startDate)>=0 and dateDiff(endDate,T)>=0,
1,
0
)
现在,您可以在该字段上添加过滤器,并在x轴上绘制带有T的折线图,并在y轴上绘制计数或sum(Active),然后根据需要向下钻取.
希望这会有所帮助.
Now, you can add a filter on that field and plot a line graph with T on x-axis and count or sum(Active) on y-axis and drill down as per your requirement.
Hope this helps.
这篇关于QuickSight-随时间推移的活动事件计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!