記錄:我通過Tebleau工具進行實踐項目鍛煉竣稽;
任務(wù)中難點都解決了---剩下樣式+布局(開心);
1、Tableau知識點(今天用到的):
1.1 時間區(qū)間計算字段 年月日比較
為確保租賃時間是有效期之內(nèi),分析有四種情況:
([lease_start]>=[Select Start YM] and [lease_start]<[Select End YM])
//p.s <= d.s < p.e? 特例:p.e=20190101,展示的不包括1月份的數(shù)據(jù)
OR
([lease_end]>=[Select Start YM] and [lease_end]<=[Select End YM])
//p.s <= d.e <= p.e
OR
([lease_start]<=[Select Start YM] and [lease_end]>=[Select End YM])
//d.s <= p.s and d.e >= p.e
1.2 時間區(qū)間計算字段 年月比較:
IF ([Select Start Year]*12+[Select Start Month])<=([year]*12+[month]) AND
? ([year]*12+[month])<=([Select End Year]*12+[Select End Month])
THEN true
ELSE FALSE
END
//p.s <= d.s <= p.e