[英]Creating a date calculated field in tableau
我在 tableau 中有一个开始日期和一个结束日期,有没有办法创建一个计算字段,其中包含从我的开始日期到结束日期的所有日期(月)?
If you're just looking for a visual solution, if you place a Month(date) discrete dimension in your columns bar, right click on it and click on 'Show missing values'.如果您只是在寻找可视化解决方案,如果您在列栏中放置了一个 Month(date) 离散维度,请右键单击它并单击“显示缺失值”。 That would force nulls to show, eg
这将强制显示空值,例如
Although what you have specifically asked for sounds like you're looking to do 'data densification' or 'data padding'.尽管您特别要求的内容听起来像是在进行“数据密集化”或“数据填充”。 You'd have to think about how that generated data would relate to the existing data.
您必须考虑生成的数据与现有数据的关系。
It might also be easier to create a static file with the month/year in columns and (left) join that to the data set you are using.用列中的月/年创建静态文件并(左)将其加入您正在使用的数据集也可能更容易。 Then you have something you can reuse.
然后你就有了可以重用的东西。 I'd recommend that approach.
我会推荐这种方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.