如何在表格中计算当前 1 年 [英] How to calculate current-1 year in tableau

查看:32
本文介绍了如何在表格中计算当前 1 年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Tableau 8.2,我想显示当前和上一年的计算,如何动态应用它?如果年份是手动编写的,这将成为可能,但这只是临时解决方案,如何动态地做到这一点?即在应用过滤器 Year=2013 时,应显示当前 1 年的销售和订单值我在列上有销售和订单.

I am using Tableau 8.2,I want to show calculations for current as well as previous year,how to apply this dynamically? it is getting possible if the year is written manually but it will be only temporary solution, how to do that dynamically? i.e on applying filter Year=2013 then sales and orders value of current-1 year should be displayed I have sales and orders On the Columns.

推荐答案

对此的快速解决方案是使用查找功能为上一年的销售额创建一个新的计算字段.

A quick solution to this would be to create a new calculated field for previous year sales by using the Lookup function.

例如:

LOOKUP(SUM([SALES]),-1)

这篇关于如何在表格中计算当前 1 年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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