2017-08-17 109 views
0
ordertype actual actual YTD 
A   900  1500 
B   500  2000 
C   200  2200 
D   300  2500 

實際列應該從計算值(減去開始日期月份的當前日期)。YTD(年初至今)日曆一面旗幟的QlikView

實際YTD應該計算基於年的當前日期減去開始日期

這裏開始日期月/年應4月1日(財政年度)

+2

歡迎堆棧溢出,請花時間去通過[歡迎瀏覽](https://stackoverflow.com/tour)瞭解你在這裏的方式(並獲得你的第一張徽章),閱讀如何[創建一個最小,完整和可驗證的示例](https:// stackoverflow。 com/help/mcve),並檢查[如何提出好問題](https://stackoverflow.com/help/how-to-ask),以便增加獲得反饋和有用答案的機會。 –

回答

0

在腳本中使用InYearToDateInMonthToDate

用例例如:

Load distinct 
    Date, 
    if(InYearToDate(Date,today(),0,4),1,0) as YTD, // the "4" mean that The year start at the 4th month, 
    if(InMonthToDate(Date,today(),0),1,0) as MTD 
resident DataTable 

現在喲烏爾日曆表,你的YTD和MTD領域,你可以像這樣使用它們:

sum({<YTD={1}>} Actual) 

,瞭解更多有關這些功能的訪問here