Tableau:将固定的工作日名称(周日到周六)作为列 [英] Tableau: Have fixed weekday names (Sunday to Saturday) as columns

查看:68
本文介绍了Tableau:将固定的工作日名称(周日到周六)作为列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是示例数据:

我正在尝试构建一个单一的组合条形图,表示在一周中的给定日期(周日到周六)预订、发货和交付的订单数量.例如:8 月 1 日是星期一:Booked-4、Shipping - 2、Delivered - 1 应该是三列,依此类推.

我使用 DATEDIFF 和基于时间的过滤器来计算不同的订单.我遇到的问题是我不能使用对应于任何特定日期的 WEEKDAY 函数,即预订、发货、交付,因为它会扰乱计数.我想使用工作日的固定值作为列.是否可以?提前致谢!

解决方案

根据您的示例数据,您可以

请参阅随附的示例工作簿.https://dl.dropboxusercontent.com/u/60455118/160810%20stack%20question.twbx

Below is the sample data:

I am trying to build a single combo bar chart representing number of orders booked, shipped, and delivered on a given day of week (Sunday through Saturday). For ex: August 1 was a Monday: Booked-4, Shipped - 2, Delivered - 1 should be the three columns and so on.

I am using DATEDIFF and time based filters to count the distinct orders. The issue that I am having is that I cant use WEEKDAY function corresponding to any particular date i.e. Booked, Shipped, Delivered as it messes up the count. I want to use fixed values for weekdays as columns. Is it possible? Thanks in advance!

解决方案

Based on your sample data, you can PIVOT it in the data window so all the dates are in one column. With that done, it would be simple to create what you're describing.

See attached sample workbook. https://dl.dropboxusercontent.com/u/60455118/160810%20stack%20question.twbx

这篇关于Tableau:将固定的工作日名称(周日到周六)作为列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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