简体   繁体   English

如何使用计算字段在 Tableau 中获得上一年的同一工作日? 例如 06/02/2020 的工作日

[英]How can I get the same week day from previous year in Tableau using a calculated field? For example the week day of 06/02/2020

I need to add the week day from previous year on the 3rd column.我需要在第三列添加上一年的工作日。

Form example 06/02/2021 was on a Wednesday.表单示例 06/02/2021 是在星期三。 I need the week day of 06/02/2021.我需要 06/02/2021 的工作日。

Thanks谢谢

try this:试试这个:

SELECT DATENAME(weekday,DATEADD(YEAR, -1, '06-02-2021'))

在此处输入图片说明

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

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