Calculated Field Date

  1. Main Date 
  • By Year 

Tahun saat ini. 

Main Date: Year 
YEAR([Order Date]) 
  • By Month 

Bulan saat ini. 

Main Date: Month 
MONTH([Order Date]) 
  1. Current Month 
  • Period: Month Name of Current Month 

Mendapatkan nama bulan saat ini. Current month mengacu pada parameter current month.

Period: Month Name of Current Month 
CASE [Current Month]  
WHEN 1 THEN “Jan”  
WHEN 2 THEN “Feb”  
WHEN 3 THEN “Mar”  
WHEN 4 THEN “Apr”  
WHEN 5 THEN “May”  
WHEN 6 THEN “Jun”  
WHEN 7 THEN “Jul”  
WHEN 8 THEN “Aug”  
WHEN 9 THEN “Sep”  
WHEN 10 THEN “Oct”  
WHEN 11 THEN “Nov”  
WHEN 12 THEN “Dec”  
END 
  • Period: Name of Current Month 

Mendapatkan nama bulan beserta tahun saat ini. Current year mengacu pada parameter current year

Period: Name of Current Month 
[Period: Month Name of Current Month] + “-” + RIGHT(STR([Current Year]),2) 
  1. Period Analyze 
  • Period: Periode Analyzed 

Mendapatkan periode waktu analisis dalam bentuk bulan dan tahun. Parameter performance scope dapat mengacu pada performance scope.

Period: Period Analyzed 
CASE [Performance Scope]  
WHEN “CM_vs_PM”  THEN [Period: Name of Current Month]  
WHEN “CM_vs_PY”  THEN [Period: Name of Current Month]  
WHEN “ACT_vs_TGT”  THEN [Period: Name of Current Month]  
WHEN “CYTD_vs_PYTD”  THEN “YTD ” + [Period: Name of Current Month]  
WHEN “YTDACT_vs_YTDTGT”  THEN “YTD ” + [Period: Name of Current Month]  
WHEN “NONE”  THEN NULL  
END 
  • Period: Period Analyzed (for trends) 

Mendapatkan periode waktu analisis dalam bentuk tahun. Parameter performance scope dapat mengacu pada performance scope, sedangkan parameter current year dapat mengacu pada current year.

Period: Period Analyzed (for trends) 
CASE [Performance Scope]  
WHEN “CM_vs_PM”  THEN NULL  
WHEN “CM_vs_PY”  THEN STR([Current Year])  
WHEN “ACT_vs_TGT”  THEN “Actual ” + STR([Current Year])  
WHEN “CYTD_vs_PYTD”  THEN “YTD ” + STR([Current Year])  
WHEN “YTDACT_vs_YTDTGT”  THEN “YTD ” + STR([Current Year]) + ” Actual”  
WHEN “NONE”  THEN NULL  
END 
  1. Period: Previous Month 
  • By Year 

Menentukan tahun dari bulan sebelumnya. Parameter current month mengacu pada current month, sedangkan parameter current year dapat mengacu pada current year

Period: Year of Previous Month 
IF [Current Month]=1 THEN  
[Current Year]-1  
ELSE  
[Current Year]  
END  
  • By Month 

Menentukan bulan sebelumnya. Parameter current month dapat mengacu pada current month

Period: Month Number of Previous Month 
IF [Current Month]=1 THEN  
12  
ELSE  
[Current Month]-1  
END 
  1. Previous Month 
  • Period: Month Name of Previous Month 

Mendapatkan nama dari bulan sebelumnya untuk case PM (Previous Month). Parameter current month dapat mengacu pada current month

Period: Month Name of Previous Month 
CASE [Current Month]  
WHEN 2 THEN “Jan”  
WHEN 3 THEN “Feb”  
WHEN 4 THEN “Mar”  
WHEN 5 THEN “Apr”  
WHEN 6 THEN “May”  
WHEN 7 THEN “Jun”  
WHEN 8 THEN “Jul”  
WHEN 9 THEN “Aug”  
WHEN 10 THEN “Sep”  
WHEN 11 THEN “Oct”  
WHEN 12 THEN “Nov”  
WHEN 1 THEN “Dec”  
END 
  • Period: Month Name of Previous Month 

Mendapatkan nama bulan beserta tahun dari bulan sebelumnya untuk case PM (Previous Month). 

Period: Name of Previous Month 
[Period: Month Name of Previous Month] + “-” + RIGHT(STR([Period: Year of Previous Month]),2) 
  1. Same Month, Previous Year 

Mendapatkan nama bulan saat ini dengan tahun sebelumnya untuk case CM_vs_PY (Current Month vs Previous year). Parameter current year dapat mengacu pada current year.

Period: Name of Same Month Previous Year 
[Period: Month Name of Current Month] + “-” + RIGHT(STR([Current Year]-1),2) 
  1. Period Reference 
  • Period: Period of Reference 

Mendapatkan periode perbandingan waktu analisis dalam bentuk bulan dan tahun. Perbandingan yang dimaksud adalah PM (Previous Month), PY (Previous Year), dst. Parameter performance scope dapat mengacu pada performance scope

Period: Period of Reference 
CASE [Performance Scope]  
WHEN “CM_vs_PM”  THEN [Period: Name of Previous Month]  
WHEN “CM_vs_PY”  THEN [Period: Name of Same Month Previous Year]  
WHEN “ACT_vs_TGT”  THEN “Target ” + [Period: Name of Current Month]  
WHEN “CYTD_vs_PYTD”  THEN “YTD ” + [Period: Name of Same Month Previous Year]  
WHEN “YTDACT_vs_YTDTGT”  THEN “YTD ” + [Period: Name of Current Month] + ” Target”  
WHEN “NONE”  THEN NULL  
END 
  • Period: Period of Reference (for trends) 

Mendapatkan periode perbandingan waktu analisis dalam bentuk tahun. Perbandingan yang dimaksud adalah PM (Previous Month), PY (Previous Year), dst. Parameter performance scope dapat mengacu pada performance scope, sedangkan parameter current year dapat mengacu pada current year

Period: Period of Reference (for trends) 
CASE [Performance Scope]  
WHEN “CM_vs_PM”  THEN NULL  
WHEN “CM_vs_PY”  THEN STR([Current Year])  
WHEN “ACT_vs_TGT”  THEN “Actual ” + STR([Current Year])  
WHEN “CYTD_vs_PYTD”  THEN “YTD ” + STR([Current Year])  
WHEN “YTDACT_vs_YTDTGT”  THEN “YTD ” + STR([Current Year]) + ” Actual”  
WHEN “NONE”  THEN NULL  
END 
  1. Last Date 
  • Month Last Date 

Mendapatkan bulan terakhir dari seluruh data. Kemudian akan digunakan pada parameter current month. 

Main Date: Month of Last Date 
{fixed: max(month( {fixed:max([Order Date])}))} 
  • Year Last Date 

Mendapatkan tahun terakhir dari seluruh data. Kemudian akan digunakan pada parameter current year.  

Main Date: Year of Last Date 
{fixed: max(year( {fixed:max([Order Date])}))} 
Was this page helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *