Tableau-数据包含开始/结束日期,如何在每个月之间进行固定访问? [英] Tableau - data contains start / end date, how to make a fixed access for every month between?

查看:967
本文介绍了Tableau-数据包含开始/结束日期,如何在每个月之间进行固定访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的帖子/数据集与此帖子中的人非常相似..

I have an extremely similar issue / set of data as the person from this post ..

基于Tableau月度的条形图,其中包含日期范围

但是,对于我的情况,公认的解决方案实际上并不起作用.他们建议制作12个计算字段,每个字段一个月,并进行透视和显示.

however the accepted solution doesn't realistically work for my case. They suggested making 12 calculated fields, one for each month, and pivot and display.

我遇到的两个问题是我的数据跨越了6年 1.因此6年x 12个月将是72个以上计算字段 2.另外,对于每个额外的新月,我必须手动创建一个新的计算字段

The 2 issues I run into with this, is my data spans across 6 years 1. So 6 years x 12 months would be 72+ calculated fields 2. Also, for each additional new month, I'd have to manually create a new calcualted field

我的数据如下:

name   | start      | end        
john   | 2015-01-15 | 2018-03-30 
tim    | 2016-02-01 | 2017-05-15 
brian  | 2017-02-15 | 2018-04-01 

在Tableau中是否有一种方法可以让轴从最小值(开始日期)和最大值(结束日期)开始每个月显示一次,这样我就可以统计每个月的总数?

Is there a way in tableau, to have one of the axis show every single month from the min (start date) and max (end date), so that I can tally a total for each month?

更新**就度量而言,它仅是记录数"计数. 基本上,我要根据每个人的开始和结束日期进行查找,为每个月创建一个总计,显示该特定月份我们有多少员工,因此输出看起来像(轴可能是两种方式):

UPDATE ** As far as a metric, it would just be a "Number of Records" count. Basically what I'm looking based on each persons start and end date, create a tally for EVERY month, showing how many employees we had for that specific month, so the output would look like (axis could be either way):

          Number of Employees
Jan 2015         3
Feb 2015         5
Mar 2015         6
  .              4
  .              5
  .              8
  .              7
Sep 2016         10
Oct 2016         13 
  .              12
  .              15 
  .              15
  .              15
Apr 2017         18
 etc...        

在此方面的帮助或指导将不胜感激!

Help or guidance would be greatly appreciated on this!

谢谢

推荐答案

在@Sam M的帮助下,我遇到了一个YouTube视频,该视频基本上给了我我想要做的事情(视频按周执行,我只是将公式的周数更改为一个月)

With a little help fron @Sam M on what to search for, I came across a youtube video that basically gave me exactly what I was looking to do (the video does it by week, I just tweeked the formulas to month)

https://www.youtube.com/watch?v=gZ9p -hV6-qM

谢谢大家!

这篇关于Tableau-数据包含开始/结束日期,如何在每个月之间进行固定访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆