如何放置过滤器以在 Tableau 中显示最近的两个日期? [英] How to put a filter to show latest two dates in Tableau?

查看:24
本文介绍了如何放置过滤器以在 Tableau 中显示最近的两个日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Tableau 中放置一个过滤器,它会自动显示过去两天的数据.我尝试使用 Dense rank(在 SQL 中有效),但在 Tableau 中我不知道要使用哪个聚合器函数.

I am trying to put a filter in Tableau which automatically shows data for last two days. I tried using Dense rank (which works in SQL) but in Tableau I can't figure out which aggregator function to use with it.

如何设置过滤器以在 Tableau 中显示最近的两个日期?

How can I put a filter to show latest two dates in Tableau?

推荐答案

基于最近日期的过滤通常可以通过以下方式轻松完成:

Filtering based upon the most recent dates is generally easily done by:

  1. 右键单击日期字段并将其拖动到过滤器架
  2. 选择个人日期"
  3. 从过滤器对话框中,选择顶部"和按字段"
  4. 选择Top",2(最近两个日期)
  5. 选择日期字段并选择最大值进行聚合.

这篇 Tableau KB 文章也很好地描述了该技术:http://kb.tableau.com/articles/howto/filter-on-last-date-in-the-data-source

This Tableau KB article also has a good write up of the technique: http://kb.tableau.com/articles/howto/filter-on-last-date-in-the-data-source

这篇关于如何放置过滤器以在 Tableau 中显示最近的两个日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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