【发布时间】:2016-05-26 23:58:25
【问题描述】:
下面提到的是获取前几个月的计算字段。
CASE [TimeFrame]
when 'DateMonth' then if [Months between today and Date]=0 then 'show' end
when 'Last2Months' then if [Months between today and Date]>=0 and [Months between today and Date]<=1 then 'show' end
when 'Last3Months' then if [Months between today and Date]>=0 and [Months between today and Date]<=2 then 'show' end
else 'hide'
end
上述计算在 Last2Months 和 Last3Months 上按预期工作,但未显示当月的任何结果。
例如,如果用户选择 11/1/2015 那么,
- DateMonth 应该是 11 月 -- 目前没有显示任何数据...
- Last2Months 应该是 11 月和 10 月——按预期工作
- Last3Months 应该是 11 月、10 月和 9 月——按预期工作。
我还需要将月份添加为滚动总和并自动显示,而不是选择下拉菜单。
请找到所附的twbx。
任何意见将不胜感激。
【问题讨论】:
-
似乎没有附加任何东西。
标签: tableau-api