<?xml version = "1.0" encoding="UTF-8"?> <!-- <?xml version = "1.0" encoding="UTF-8" standalone="yes"?> --> <Schema name="myHR" measuresCaption="ตัววัด"> <!--<Schema name="myHR" measuresCaption="%{myhr.measures.caption}"> --> <!-- Share Dimension --> <Dimension name="company" caption="บริษัท"> <Hierarchy name="company" hasAll="true" allMemberName="all company" allMemberCaption="รวมทุกบริษัท" primaryKey="COMPANYID"> <Table name="MCOMPANY"/> <Level name="company" column="COMPANYID" nameColumn="TNAME" uniqueMembers="true"> <Property name="companyid" column="COMPANYID" caption="รหัสบริษัท"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="gender" caption="เพศ"> <Hierarchy name="gender" hasAll="true" allMemberName="all gender" allMemberCaption="รวมทุกเพศ" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="gender" column="SEX" uniqueMembers="false"> <NameExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."SEX" = '1' then 'ชาย' when "MEMPLOYEE"."SEX" = '2' then 'หญิง' else 'อื่นๆ (?)' end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."SEX" = '1' then 'ชาย' when "MEMPLOYEE"."SEX" = '2' then 'หญิง' else 'อื่นๆ (?)' end) </SQL> </NameExpression> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costtype" caption="Cost type"> <Hierarchy name="costtype" hasAll="true" allMemberName="all costtype" allMemberCaption="รวมทุก Cost type" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="costtype" column="COST_TYPE" uniqueMembers="false"> <NameExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."COST_TYPE" = '1' then 'DL' when "MEMPLOYEE"."COST_TYPE" = '2' then 'IDL' when "MEMPLOYEE"."COST_TYPE" = '3' then 'Management' else 'Other' end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."COST_TYPE" = '1' then 'DL' when "MEMPLOYEE"."COST_TYPE" = '2' then 'IDL' when "MEMPLOYEE"."COST_TYPE" = '3' then 'Management' else 'Other' end) </SQL> </NameExpression> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="bu1" caption="หน่วยงานระดับ 1"> <Hierarchy name="bu1" hasAll="true" allMemberName="All bu1" allMemberCaption="รวมทุกหน่วยงานระดับ 1" primaryKey="BU1ID"> <Table name="MBU1"/> <Level name="bu1" column="BU1ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu1id" column="BU1ID" caption="รหัสสำนักงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="bu2" caption="หน่วยงานระดับ 2"> <Hierarchy name="bu2" hasAll="true" allMemberName="All bu2" allMemberCaption="รวมทุกหน่วยงานระดับ 2" primaryKey="BU2ID"> <Table name="MBU2"/> <Level name="bu2" column="BU2ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu2id" column="BU2ID" caption="รหัสศูนย์"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="bu3" caption="หน่วยงานระดับ 3"> <Hierarchy name="bu3" hasAll="true" allMemberName="All bu3" allMemberCaption="รวมทุกหน่วยงานระดับ 3" primaryKey="BU3ID"> <Table name="MBU3"/> <Level name="bu3" column="BU3ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu3id" column="BU3ID" caption="รหัสฝ่าย"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="bu4" caption="หน่วยงานระดับ 4"> <Hierarchy name="bu4" hasAll="true" allMemberName="All bu4" allMemberCaption="รวมทุกหน่วยงานระดับ 4" primaryKey="BU4ID"> <Table name="MBU4"/> <Level name="bu4" column="BU4ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu4id" column="BU4ID" caption="งาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="bu5" caption="หน่วยงานระดับ 5"> <Hierarchy name="bu5" hasAll="true" allMemberName="All bu5" allMemberCaption="รวมทุกหน่วยงานระดับ 5" primaryKey="BU5ID"> <Table name="MBU5"/> <Level name="bu5" column="BU5ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu5id" column="BU5ID" caption="รหัสหน่วยงานระดับ 5"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="group" caption="กลุ่มพนักงาน"> <Hierarchy name="group" hasAll="true" allMemberName="All group" allMemberCaption="รวมทุกกลุ่มพนักงาน" primaryKey="GROUPID"> <Table name="MGROUP"/> <Level name="group" column="GROUPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="groupid" column="GROUPID" caption="รหัสกลุ่มพนักงาน"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="status" caption="สถานภาพการทำงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="status" column="STATUS" uniqueMembers="true"> <NameExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."STATUS" in ('A') then 'ทำงาน (A)' when "MEMPLOYEE"."STATUS" in ('B') then 'ศึกษาต่อ (B)' when "MEMPLOYEE"."STATUS" in ('S') then 'จ้างผ่านระเบียบพัสดุ (S)' when "MEMPLOYEE"."STATUS" in ('T') then 'ฝึกงาน (T)' when "MEMPLOYEE"."STATUS" in ('U') then 'มรณะ (U)' when "MEMPLOYEE"."STATUS" in ('V') then 'ทดลองงาน (V)' when "MEMPLOYEE"."STATUS" in ('W') then 'พักงาน (W)' when "MEMPLOYEE"."STATUS" in ('X') then 'ปลดออก (X)' when "MEMPLOYEE"."STATUS" in ('Y') then 'ลาออก (Y)' when "MEMPLOYEE"."STATUS" in ('Z') then 'เกษียณ (Z)' else 'อื่น ๆ' end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATUS" in ('A') then 'ทำงาน (A)' when "MEMPLOYEE"."STATUS" in ('B') then 'ศึกษาต่อ (B)' when "MEMPLOYEE"."STATUS" in ('S') then 'จ้างผ่านระเบียบพัสดุ (S)' when "MEMPLOYEE"."STATUS" in ('T') then 'ฝึกงาน (T)' when "MEMPLOYEE"."STATUS" in ('U') then 'มรณะ (U)' when "MEMPLOYEE"."STATUS" in ('V') then 'ทดลองงาน (V)' when "MEMPLOYEE"."STATUS" in ('W') then 'พักงาน (W)' when "MEMPLOYEE"."STATUS" in ('X') then 'ปลดออก (X)' when "MEMPLOYEE"."STATUS" in ('Y') then 'ลาออก (Y)' when "MEMPLOYEE"."STATUS" in ('Z') then 'เกษียณ (Z)' else 'อื่น ๆ' end) </SQL> </NameExpression> </Level> </Hierarchy> </Dimension> --> <Dimension name="status" caption="สถานภาพพนักงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" allMemberCaption="รวมทุกสถานภาพพนักงาน" primaryKey="STATUS"> <View alias="VIEW_OLAP_MSTATUS"> <SQL dialect="oracle"> SELECT DISTINCT STATUS , case when STATUS='A' then 'ปรกติ' when STATUS='B' then 'ศึกษาต่อ' when STATUS='S' then 'จ้างผ่านระเบียบพัสดุ' when STATUS='T' then 'ฝึกงาน' when STATUS='V' then 'ทดลองงาน' when STATUS='U' then 'มรณะ' when STATUS='W' then 'พักงาน' when STATUS='X' then 'ปลดออก' when STATUS='Y' then 'ลาออก' when STATUS='Z' then 'เกษียณ' else ' ' end as TDESC , case when STATUS='A' then '1' when STATUS='B' then '1' when STATUS='S' then '1' when STATUS='T' then '1' when STATUS='V' then '1' when STATUS='U' then '0' when STATUS='W' then '0' when STATUS='X' then '0' when STATUS='Y' then '0' when STATUS='Z' then '0' else ' ' end as STATUS_GRP , case when STATUS='A' then 'Active' when STATUS='B' then 'Active' when STATUS='S' then 'Active' when STATUS='T' then 'Active' when STATUS='V' then 'Active' when STATUS='U' then 'non-Active' when STATUS='W' then 'non-Active' when STATUS='X' then 'non-Active' when STATUS='Y' then 'non-Active' when STATUS='Z' then 'non-Active' else ' ' end as GRP_TDESC FROM MEMPLOYEE </SQL> <SQL dialect="mssql"> SELECT DISTINCT STATUS , case when STATUS='A' then 'ปรกติ' when STATUS='B' then 'ศึกษาต่อ' when STATUS='S' then 'จ้างผ่านระเบียบพัสดุ' when STATUS='T' then 'ฝึกงาน' when STATUS='V' then 'ทดลองงาน' when STATUS='U' then 'มรณะ' when STATUS='W' then 'พักงาน' when STATUS='X' then 'ปลดออก' when STATUS='Y' then 'ลาออก' when STATUS='Z' then 'เกษียณ' else ' ' end as TDESC , case when STATUS='A' then '1' when STATUS='B' then '1' when STATUS='S' then '1' when STATUS='T' then '1' when STATUS='V' then '1' when STATUS='U' then '0' when STATUS='W' then '0' when STATUS='X' then '0' when STATUS='Y' then '0' when STATUS='Z' then '0' else ' ' end as STATUS_GRP , case when STATUS='A' then 'Active' when STATUS='B' then 'Active' when STATUS='S' then 'Active' when STATUS='T' then 'Active' when STATUS='V' then 'Active' when STATUS='U' then 'non-Active' when STATUS='W' then 'non-Active' when STATUS='X' then 'non-Active' when STATUS='Y' then 'non-Active' when STATUS='Z' then 'non-Active' else ' ' end as GRP_TDESC FROM MEMPLOYEE </SQL> </View> <Level name="status_grp" column="STATUS_GRP" nameColumn="GRP_TDESC" uniqueMembers="false"/> <Level name="status" column="STATUS" nameColumn="TDESC" uniqueMembers="true"> <Property name="status" column="STATUS" caption="รหัสสถานภาพพนักงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <!-- ใช้ code ข้างบนแทน <Dimension name="status" caption="สถานภาพพนักงาน"> <Hierarchy name="status" hasAll="true" allMemberName="All status" primaryKey="STATUS"> <Table name="OLAP_MSTATUS"/> <Level name="status_grp" column="STATUS_GRP" nameColumn="GRP_TDESC" uniqueMembers="true"/> <Level name="status" column="STATUS" nameColumn="TDESC" uniqueMembers="true"> <Property name="status" column="STATUS" caption="รหัสสถานภาพพนักงาน"/> </Level> </Hierarchy> </Dimension> --> <!-- ยังใช้ไม่ได้ <Dimension name="status" caption="สถานภาพการทำงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" primaryKey="status"> <InlineTable alias="AGERANGE"> <ColumnDefs> <ColumnDef name="status" type="String"/> <ColumnDef name="tdesc" type="String"/> <ColumnDef name="group" type="String"/> <ColumnDef name="group_tdesc" type="String"/> </ColumnDefs> <ROWS> <ROW> <Value column="status">A</Value> <Value column="tdesc">ทำงาน</Value> <Value column="group">1</Value> <Value column="group_tdesc">ทำงาน</Value> </ROW> <ROW> <Value column="status">X</Value> <Value column="tdesc">ปลดออก</Value> <Value column="group">2</Value> <Value column="group_tdesc">ไม่ทำงาน</Value> </ROW> </ROWS> </InlineTable> <Level name="status1" column="group" uniqueMembers="true"/> <Level name="status2" column="status" uniqueMembers="true"/> </Hierarchy> </Dimension> --> <!-- ยังใช้ไม่ได้ <Dimension name="status" caption="สถานภาพการทำงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="status_active" column="STATUS" uniqueMembers="false"> <NameExpression> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATUS" in ('A' , 'S' , 'T' , 'V') then 'ทำงาน (A,S,T,V)' else 'ไม่ทำงาน' end) </SQL> </NameExpression> </Level> <Level name="status_nonactive" column="STATUS" uniqueMembers="false"> <NameExpression> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATUS" in ('A') then 'ทำงาน (A)' when "MEMPLOYEE"."STATUS" in ('B') then 'ศึกษาต่อ (B)' when "MEMPLOYEE"."STATUS" in ('S') then 'จ้างผ่านระเบียบพัสดุ (S)' when "MEMPLOYEE"."STATUS" in ('T') then 'ฝึกงาน (T)' when "MEMPLOYEE"."STATUS" in ('U') then 'มรณะ (U)' when "MEMPLOYEE"."STATUS" in ('V') then 'ทดลองงาน (V)' when "MEMPLOYEE"."STATUS" in ('W') then 'พักงาน (W)' when "MEMPLOYEE"."STATUS" in ('X') then 'ปลดออก (X)' when "MEMPLOYEE"."STATUS" in ('Y') then 'ลาออก (Y)' when "MEMPLOYEE"."STATUS" in ('Z') then 'เกษียณ (Z)' else 'อื่น ๆ' end) </SQL> </NameExpression> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- <Dimension name="emp_type" caption="ประเภทพนักงาน"> <Hierarchy name="emp_type" hasAll="true" allMemberName="all emp_type" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="emp_type" column="EMP_TYPE" uniqueMembers="false"/> </Hierarchy> </Dimension> --> <Dimension name="emp_type" caption="ประเภทพนักงาน"> <Hierarchy name="emp_type" hasAll="true" allMemberName="all emp_type" allMemberCaption="รวมทุกประเภทพนักงาน" primaryKey="EMP_TYPE"> <View alias="VIEW_OLAP_MEMP_TYPE"> <SQL dialect="oracle"> SELECT DISTINCT EMP_TYPE , case when EMP_TYPE = '1' then 'ประจำ' when EMP_TYPE = '2' then 'สัญญาจ้าง' else 'อื่นๆ ' end as TDESC FROM MEMPLOYEE </SQL> <SQL dialect="mssql"> SELECT DISTINCT EMP_TYPE , case when EMP_TYPE = '1' then 'ประจำ' when EMP_TYPE = '2' then 'สัญญาจ้าง' else 'อื่นๆ ' end as TDESC FROM MEMPLOYEE </SQL> </View> <Level name="emp_type" column="EMP_TYPE" nameColumn="TDESC" uniqueMembers="false"> <Property name="emp_type" column="EMP_TYPE" caption="รหัสประเภทพนักงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="emp_type_e" caption="ประเภทพนักงาน"> <Hierarchy name="emp_type" hasAll="true" allMemberName="all emp_type" allMemberCaption="รวมทุกประเภทพนักงาน" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPLOYEE_MEMP_TYPE"> <SQL dialect="oracle"> SELECT DISTINCT EMPLOYEEID , EMP_TYPE , case when EMP_TYPE = '1' then 'ประจำ' when EMP_TYPE = '2' then 'สัญญาจ้าง' else 'อื่นๆ ' end as TDESC FROM MEMPLOYEE </SQL> <SQL dialect="mssql"> SELECT DISTINCT EMPLOYEEID , EMP_TYPE , case when EMP_TYPE = '1' then 'ประจำ' when EMP_TYPE = '2' then 'สัญญาจ้าง' else 'อื่นๆ ' end as TDESC FROM MEMPLOYEE </SQL> </View> <Level name="emp_type" column="EMP_TYPE" nameColumn="TDESC" uniqueMembers="false"> <Property name="emp_type" column="EMP_TYPE" caption="รหัสประเภทพนักงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="blood" caption="กรุ๊ปเลือด"> <Hierarchy name="blood" hasAll="true" allMemberName="all blood" allMemberCaption="รวมทุกกรุ๊ปเลือด" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="blood" column="BLOOD" uniqueMembers="false"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="position" caption="ตำแหน่ง"> <Hierarchy name="position" hasAll="true" allMemberName="all position" allMemberCaption="รวมทุกตำแหน่ง" primaryKey="POSITIONID"> <Table name="MPOSITION"/> <Level name="positionid" column="POSITIONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="positionid" column="POSITIONID" caption="รหัสตำแหน่ง"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="job" caption="ลักษณะงาน"> <Hierarchy name="job" hasAll="true" allMemberName="all job" allMemberCaption="รวมทุกลักษณะงาน" primaryKey="JOBCODEID"> <Table name="MJOBCODE"/> <Level name="job" column="JOBCODEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobcode" column="JOBCODEID" caption="รหัสลักษณะงาน"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="job" caption="ลักษณะงาน"> <Hierarchy name="job" hasAll="true" allMemberName="all job" allMemberCaption="รวมทุกลักษณะงาน" primaryKey="JOBCODEID" primaryKeyTable="MJOBCODE"> <Join leftKey="JOBGROUP" rightAlias="MJOBGROUP" rightKey="JOBGROUPID"> <Table name="MJOBCODE"/> <Join leftKey="MAINJOBGROUPID" rightKey="MAINJOBGROUPID"> <Table name="MJOBGROUP"/> <Table name="MMAINJOBGROUP"/> </Join> </Join> <Level name="mainjobgroupid" table="MMAINJOBGROUP" column="MAINJOBGROUPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="mainjobgroupid" column="MAINJOBGROUPID" caption="รหัสกลุ่มลักษณะงาน"/> </Level> <Level name="jobgroupid" table="MJOBGROUP" column="JOBGROUPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobgroupid" column="JOBGROUPID" caption="รหัสประเภทลักษณะงาน"/> </Level> <Level name="jobcode" table="MJOBCODE" column="JOBCODEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobcode" column="JOBCODEID" caption="รหัสลักษณะงาน"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <Dimension name="time0" caption="เวลาการทำงาน"> <Hierarchy name="time0" hasAll="true" allMemberName="all time0" allMemberCaption="รวมทุกเวลาการทำงาน" primaryKey="TIME0ID"> <Table name="MTIME0"/> <Level name="time0id" column="TIME0ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="time0id" column="TIME0ID" caption="รหัสเวลาการทำงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="national" caption="สัญชาติ"> <Hierarchy name="national" hasAll="true" allMemberName="all national" allMemberCaption="รวมทุกสัญชาติ" primaryKey="NATIONALID"> <Table name="MNATIONAL"/> <Level name="national" column="NATIONALID" nameColumn="TDESC" uniqueMembers="true"> <Property name="nationalid" column="NATIONALID" caption="รหัสสัญชาติ"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="religion" caption="ศาสนา"> <Hierarchy name="religion" hasAll="true" allMemberName="all religion" allMemberCaption="รวมทุกศาสนา" primaryKey="RELIGIONID"> <Table name="MRELIGION"/> <Level name="religion" column="RELIGIONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="religionid" column="RELIGIONID" caption="รหัสศาสนา"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="salatype" caption="ระยะเวลาการจ่ายเงิน"> <Hierarchy name="salatype" hasAll="true" allMemberName="all salatype" allMemberCaption="รวมทุกระยะเวลาการจ่ายเงิน" primaryKey="CODEID"> <Table name="MSALATYPE0"/> <Level name="salatype" column="CODEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="codeid" column="CODEID" caption="รหัสระยะเวลาการจ่ายเงิน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="statmarry" caption="สถานภาพสมรส"> <Hierarchy name="statmarry" hasAll="true" allMemberName="all statmarry" allMemberCaption="รวมทุกสถานภาพสมรส" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="statmarry" column="STATMARRY" uniqueMembers="true"> <NameExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."STATMARRY" ='S' then 'โสด (S)' when "MEMPLOYEE"."STATMARRY" ='M' then 'แต่งงาน (M)' when "MEMPLOYEE"."STATMARRY" ='D' then 'หย่า (D)' when "MEMPLOYEE"."STATMARRY" ='W' then 'หม้าย (W)' else 'อื่นๆ (?)' end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATMARRY" ='S' then 'โสด (S)' when "MEMPLOYEE"."STATMARRY" ='M' then 'แต่งงาน (M)' when "MEMPLOYEE"."STATMARRY" ='D' then 'หย่า (D)' when "MEMPLOYEE"."STATMARRY" ='W' then 'หม้าย (W)' else 'อื่นๆ (?)' end) </SQL> </NameExpression> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="project" caption="โครงการ"> <Hierarchy name="project" hasAll="true" allMemberName="all project" allMemberCaption="รวมทุกโครงการ" primaryKey="PROJECTID"> <Table name="MPROJECT"/> <Level name="project" column="PROJECTID" nameColumn="TDESC" uniqueMembers="true"> <Property name="projectid" column="PROJECTID" caption="รหัสโครงการ"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="degree" caption="การศึกษา (ระดับ)"> <Hierarchy name="degree" hasAll="true" allMemberName="all degree" allMemberCaption="รวมทุกการศึกษา (ระดับ)" primaryKey="DEGREEID"> <Table name="MDEGREE"/> <Level name="degree" column="DEGREEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="degreeid" column="DEGREEID" caption="รหัสระดับการศึกษา"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="major" caption="การศึกษา (วิชาเอก)"> <Hierarchy name="major" hasAll="true" allMemberName="all major" allMemberCaption="รวมทุกการศึกษา (วิชาเอก)" primaryKey="MAJORID"> <Table name="MMAJOR"/> <Level name="majorid" column="MAJORID" nameColumn="TDESC" uniqueMembers="true"> <Property name="majorid" column="MAJORID" caption="รหัสวิชาเอก"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="edubackground" caption="การศึกษา (วุฒิ)"> <Hierarchy name="edubackground" hasAll="true" allMemberName="all edubackground" allMemberCaption="รวมทุกการศึกษา (วุฒิ)" primaryKey="BACKGROUNDID"> <Table name="MEDUBACKGROUND"/> <Level name="backgroundid" column="BACKGROUNDID" nameColumn="TDESC" uniqueMembers="true"> <Property name="backgroundid" column="BACKGROUNDID" caption="รหัสวุฒิการศึกษา"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="institue" caption="การศึกษา (ประเทศ-สถาบัน)"> <Hierarchy name="institue" hasAll="true" allMemberName="all institue" allMemberCaption="รวมทุกการศึกษา (ประเทศ-สถาบัน)" primaryKey="INSTITUEID" primaryKeyTable="MINSTITUE"> <Join leftKey="COUNTRYID" rightKey="COUNTRYID"> <Table name="MINSTITUE"/> <Table name="MCOUNTRY"/> </Join> <Level name="countryid" table="MCOUNTRY" column="COUNTRYID" nameColumn="TDESC" uniqueMembers="true"> <Property name="countryid" column="COUNTRYID" caption="รหัสประเทศสถาบันการศึกษา" uniqueMembers="true"/> </Level> <Level name="institueid" table="MINSTITUE" column="INSTITUEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="institueid" column="INSTITUEID" caption="รหัสสถาบันการศึกษา" uniqueMembers="true"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="expertise" caption="ความเชี่ยวชาญ"> <Hierarchy name="expertise" hasAll="true" allMemberName="all expertise" allMemberCaption="รวมทุกความเชี่ยวชาญ" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EXPERTISE"> <Join leftKey="EXPERTID" rightKey="EXPERTID"> <Table name="MEMPL_EXPERTISE"/> <Table name="MEXPERTISE"/> </Join> <Level name="expertid" table="MEXPERTISE" column="EXPERTID" nameColumn="TDESC" uniqueMembers="true"> <Property name="expertid" column="EXPERTID" caption="รหัสความเชี่ยวชาญ"/> </Level> </Hierarchy> </Dimension> <Dimension name="bank" caption="ธนาคาร"> <Hierarchy name="bank" hasAll="true" allMemberName="all bank" allMemberCaption="รวมทุกธนาคาร" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_BANK"> <Join leftKey="BANKID" rightKey="BANKID"> <Table name="MEMPL_BANK"/> <Table name="MBANK"/> </Join> <Level name="bankid" table="MBANK" column="BANKID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bankid" column="BANKID" caption="รหัสธนาคาร"/> </Level> </Hierarchy> </Dimension> <Dimension name="skill" caption="ความสามารถพิเศษ"> <Hierarchy name="skill" hasAll="true" allMemberName="all skill" allMemberCaption="รวมทุกความสามารถพิเศษ" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_SKILL"> <Join leftKey="SKILLID" rightAlias="MSKILL" rightKey="SKILLID"> <Table name="MEMPL_SKILL"/> <Join leftKey="SKILLGROUPID" rightKey="SKILLGROUPID"> <Table name="MSKILL"/> <Table name="MSKILLGROUP"/> </Join> </Join> <Level name="skillgroupid" table="MSKILLGROUP" column="SKILLGROUPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="skillgroupdesc" column="SKILLGROUPID" caption="รหัสกลุ่มความสามารถพิเศษ" uniqueMembers="true"/> </Level> <Level name="skillid" table="MSKILL" column="SKILLID" nameColumn="TDESC" uniqueMembers="true"> <Property name="skilldesc" column="SKILLID" caption="รหัสความสามารถพิเศษ" uniqueMembers="true"/> </Level> </Hierarchy> </Dimension> <!-- ผลลัพธ์ยังไม่ชัดว่าถูกหรือไม่ --> <Dimension name="current_province" caption="จังหวัด-เขต (ที่อยู่ปัจจุบัน)"> <Hierarchy name="current_province" hasAll="true" allMemberName="all current_province" allMemberCaption="รวมทุกจังหวัด-เขต (ที่อยู่ปัจจุบัน)" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_CURRENT_PROVINCE"> <SQL dialect="oracle"> SELECT DISTINCT a.EMPLOYEEID , a.AMPHUR , a.ZIPCODE , b.PROVINCE , c.LONG_TNAME , c.LONG_ENAME FROM MEMPL_ADDR a , CSCZIPCODE b , MPROVINCE c WHERE a.ADDR_CURRENT = '1' and a.ZIPCODE = b.ZIPCODE and b.PROVINCE = c.PROVINCEID </SQL> <!-- เดิมมี ORDER BY b.PROVINCE , a.AMPHUR แต่กด drill throught แล้ว error "ORDER BY"--> <SQL dialect="mssql"> SELECT DISTINCT a.EMPLOYEEID , a.AMPHUR , a.ZIPCODE , b.PROVINCE , c.LONG_TNAME , c.LONG_ENAME FROM MEMPL_ADDR a , CSCZIPCODE b , MPROVINCE c WHERE a.ADDR_CURRENT = '1' and a.ZIPCODE = b.ZIPCODE and b.PROVINCE = c.PROVINCEID </SQL> <!-- เดิมมี ORDER BY b.PROVINCE , a.AMPHUR แต่กด drill throught แล้ว error "ORDER BY"--> </View> <Level name="provinceid" column="PROVINCE" nameColumn="LONG_TNAME" uniqueMembers="true"> <Property name="provinceid" column="PROVINCE" caption="รหัสจังหวัด"/> </Level> <Level name="amphur" column="AMPHUR"/> </Hierarchy> </Dimension> <!-- ผลลัพธ์ยังไม่ชัดว่าถูกหรือไม่ --> <!-- <Dimension name="current_province" caption="จังหวัด-เขต (ที่อยู่ปัจจุบัน)"> <Hierarchy name="current_province" hasAll="true" allMemberName="all current_province" primaryKey="EMPLOYEEID" primaryKeyTable="VIEW_OLAP_MEMPL_ADDR"> <Join leftKey="ZIPCODE" rightAlias="VIEW_OLAP_CSCZIPCODE" rightKey="ZIPCODE"> <Table name="VIEW_OLAP_MEMPL_ADDR"/> <Join leftKey="PROVINCE" rightKey="PROVINCEID"> <Table name="VIEW_OLAP_CSCZIPCODE"/> <Table name="MPROVINCE"/> </Join> </Join> <Level name="provinceid" table="MPROVINCE" column="PROVINCEID" nameColumn="LONG_TNAME" uniqueMembers="true"> <Property name="provinceid" column="PROVINCEID" caption="รหัสจังหวัด" uniqueMembers="true"/> </Level> <Level name="amphur" table="VIEW_OLAP_MEMPL_ADDR" column="AMPHUR"/> </Hierarchy> </Dimension> --> <Dimension name="sitewel" caption="โรงพยาบาล"> <Hierarchy name="sitewel" hasAll="true" allMemberName="all sitewel" allMemberCaption="รวมทุกโรงพยาบาล" primaryKey="SITEWELID" primaryKeyTable="MSITEWEL"> <Join leftKey="SITEWELGID" rightKey="SITEWELGID"> <Table name="MSITEWEL"/> <Table name="MSITEWELGRP"/> </Join> <Level name="sitewelgid" table="MSITEWELGRP" column="SITEWELGID" nameColumn="TDESC" uniqueMembers="true"> <Property name="sitewelgid" column="SITEWELGID" caption="รหัสกลุ่มโรงพยาบาล"/> </Level> <Level name="sitewelid" table="MSITEWEL" column="SITEWELID" nameColumn="TDESC" uniqueMembers="true"> <Property name="sitewelid" column="SITEWELID" caption="รหัสโรงพยาบาล"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <!-- 07/11/2550...ทัศ --> <Dimension name="branch" caption="สาขาบริษัท"> <Hierarchy name="branch" hasAll="true" allMemberName="all branch" allMemberCaption="รวมทุกสาขาบริษัท" primaryKey="BRANCHID"> <Table name="MBRANCH"/> <Level name="branchid" column="BRANCHID" nameColumn="TDESC" uniqueMembers="true"> <Property name="branchid" column="BRANCHID" caption="รหัสสาขาบริษัท"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <!-- 07/11/2550...ทัศ --> <Dimension name="workarea" caption="สถานที่ทำงาน"> <Hierarchy name="workarea" hasAll="true" allMemberName="all workarea" allMemberCaption="รวมทุกสถานที่ทำงาน" primaryKey="WORKAREAID"> <Table name="MWORKAREA"/> <Level name="workareaid" column="WORKAREAID" nameColumn="TDESC" uniqueMembers="true"> <Property name="workareaid" column="WORKAREAID" caption="รหัสสถานที่ทำงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <!-- ใช้ข้างล่างแทน --> <Dimension name="degree_e" caption="การศึกษา (ระดับ)"> <Hierarchy name="degree" hasAll="true" allMemberName="all degree" allMemberCaption="รวมทุกการศึกษา (ระดับ)" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EDUCATE"> <Join leftKey="DEGREEID" rightKey="DEGREEID"> <Table name="MEMPL_EDUCATE"/> <Table name="MDEGREE"/> </Join> <Level name="degreeid" table="MDEGREE" column="DEGREEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="degreeid" column="DEGREEID" caption="รหัสระดับการศึกษา"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="degree_e" caption="การศึกษา (ระดับ)"> <Hierarchy name="degree" hasAll="true" allMemberName="all degree" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPL_EDUCATE_DEGREE"> <SQL dialect="oracle"> SELECT a.EMPLOYEEID , a.DEGREEID , b.TDESC , b.EDESC FROM MEMPL_EDUCATE a , MDEGREE b WHERE a.REFERENCE = 1 and a.DEGREEID = b.DEGREEID </SQL> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , b.DEGREEID , c.TDESC , c.EDESC FROM MEMPLOYEE a , MEMPL_EDUCATE b , MDEGREE c WHERE a.EMPLOYEEID = b.EMPLOYEEID and b.DEGREEID = c.DEGREEID and b.REFERENCE = 1 </SQL> </View> <Level name="degreeid" column="DEGREEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="degreeid" column="DEGREEID" caption="รหัสระดับการศึกษา"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- ใช้ข้างล่างแทน --> <Dimension name="major_e" caption="การศึกษา (วิชาเอก)"> <Hierarchy name="major" hasAll="true" allMemberName="all major" allMemberCaption="รวมทุกการศึกษา (วิชาเอก)" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EDUCATE"> <Join leftKey="MAJORID" rightKey="MAJORID"> <Table name="MEMPL_EDUCATE"/> <Table name="MMAJOR"/> </Join> <Level name="majorid" table="MMAJOR" column="MAJORID" nameColumn="TDESC" uniqueMembers="true"> <Property name="majorid" column="MAJORID" caption="รหัสวิชาเอก"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="major_e" caption="การศึกษา (วิชาเอก)"> <Hierarchy name="major" hasAll="true" allMemberName="all major" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPL_EDUCATE_MAJOR"> <SQL dialect="oracle"> SELECT a.EMPLOYEEID , a.MAJORID , b.TDESC , b.EDESC FROM MEMPL_EDUCATE a , MMAJOR b WHERE a.REFERENCE = 1 and a.MAJORID = b.MAJORID </SQL> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , b.MAJORID , c.TDESC , c.EDESC FROM MEMPLOYEE a , MEMPL_EDUCATE b , MMAJOR c WHERE a.EMPLOYEEID = b.EMPLOYEEID and b.MAJORID = c.MAJORID and b.REFERENCE = 1 </SQL> </View> <Level name="majorid" column="MAJORID" nameColumn="TDESC" uniqueMembers="true"> <Property name="majorid" column="MAJORID" caption="รหัสวิชาเอก"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- ใช้ข้างล่างแทน --> <Dimension name="edubackground_e" caption="การศึกษา (วุฒิ)"> <Hierarchy name="edubackground" hasAll="true" allMemberName="all edubackground" allMemberCaption="รวมทุกการศึกษา (วุฒิ)" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EDUCATE"> <Join leftKey="BACKGROUNDID" rightKey="BACKGROUNDID"> <Table name="MEMPL_EDUCATE"/> <Table name="MEDUBACKGROUND"/> </Join> <Level name="backgroundid" table="MEDUBACKGROUND" column="BACKGROUNDID" nameColumn="TDESC" uniqueMembers="true"> <Property name="backgroundid" column="BACKGROUNDID" caption="รหัสวุฒิการศึกษา"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="edubackground_e" caption="การศึกษา (วุฒิ)"> <Hierarchy name="edubackground" hasAll="true" allMemberName="all edubackground" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPL_EDU_BACKGROUND"> <SQL dialect="oracle"> SELECT a.EMPLOYEEID , a.BACKGROUNDID , b.TDESC , b.EDESC FROM MEMPL_EDUCATE a , MEDUBACKGROUND b WHERE a.REFERENCE = 1 and a.BACKGROUNDID = b.BACKGROUNDID </SQL> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , b.BACKGROUNDID , c.TDESC , c.EDESC FROM MEMPLOYEE a , MEMPL_EDUCATE b , MEDUBACKGROUND c WHERE a.EMPLOYEEID = b.EMPLOYEEID and b.BACKGROUNDID = c.BACKGROUNDID and b.REFERENCE = 1 </SQL> </View> <Level name="backgroundid" column="BACKGROUNDID" nameColumn="TDESC" uniqueMembers="true"> <Property name="backgroundid" column="BACKGROUNDID" caption="รหัสวุฒิการศึกษา"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- <Dimension name="institue" caption="การศึกษา สถาบัน"> <Hierarchy name="institue" hasAll="true" allMemberName="all institue" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPL_INSTITUE"> <SQL dialect="oracle"> SELECT a.EMPLOYEEID , b.INSTITUEID , b.TDESC , b.EDESC FROM MEMPL_EDUCATE a , MINSTITUE b WHERE a.REFERENCE = 1 and a.INSTITUE = b.INSTITUEID </SQL> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , b.INSTITUEID , b.TDESC , b.EDESC FROM MEMPL_EDUCATE a , MINSTITUE b WHERE a.REFERENCE = 1 and a.INSTITUE = b.INSTITUEID </SQL> </View> <Level name="institueid" column="INSTITUEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="institueid" column="INSTITUEID" caption="การศึกษา รหัสสถาบัน"/> </Level> </Hierarchy> </Dimension> --> <!-- <Dimension name="institue" caption="การศึกษา สถาบัน"> <Hierarchy name="institue" hasAll="true" allMemberName="all institue" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EDUCATE"> <Join leftKey="INSTITUE" rightKey="INSTITUEID"> <Table name="MEMPL_EDUCATE"/> <Table name="MINSTITUE"/> </Join> <Level name="institueid" table="MINSTITUE" column="INSTITUEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="institueid" column="INSTITUEID" caption="การศึกษา รหัสสถาบัน"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- ใช้ข้างล่างแทน --> <Dimension name="institue_e" caption="การศึกษา (ประเทศ-สถาบัน)"> <Hierarchy name="country" hasAll="true" allMemberName="all institue" allMemberCaption="รวมทุกการศึกษา (ประเทศ-สถาบัน)" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPL_EDUCATE"> <Join leftKey="INSTITUE" rightAlias="MINSTITUE" rightKey="INSTITUEID"> <Table name="MEMPL_EDUCATE"/> <Join leftKey="COUNTRYID" rightKey="COUNTRYID"> <Table name="MINSTITUE"/> <Table name="MCOUNTRY"/> </Join> </Join> <Level name="countryid" table="MCOUNTRY" column="COUNTRYID" nameColumn="TDESC" uniqueMembers="true"> <Property name="countryid" column="COUNTRYID" caption="รหัสประเทศสถาบันการศึกษา" uniqueMembers="true"/> </Level> <Level name="institueid" table="MINSTITUE" column="INSTITUEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="institueid" column="INSTITUEID" caption="รหัสสถาบันการศึกษา" uniqueMembers="true"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="institue_e" caption="การศึกษา (ประเทศ-สถาบัน)"> <Hierarchy name="country" hasAll="true" allMemberName="all institue" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPL_EDU_INSTITUE"> <SQL dialect="oracle"> SELECT a.EMPLOYEEID , b.INSTITUEID , b.TDESC AS INSTITUE_TDESC , b.EDESC AS INSTITUE_EDESC , c.COUNTRYID , c.TDESC AS COUNTRY_TDESC , c.EDESC AS COUNTRY_EDESC FROM MEMPL_EDUCATE a , MINSTITUE b , MCOUNTRY c WHERE a.REFERENCE = 1 and a.INSTITUE = b.INSTITUEID and b.COUNTRYID = c.COUNTRYID </SQL> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , b.INSTITUEID , b.TDESC AS INSTITUE_TDESC , b.EDESC AS INSTITUE_EDESC , c.COUNTRYID , c.TDESC AS COUNTRY_TDESC , c.EDESC AS COUNTRY_EDESC FROM MEMPL_EDUCATE a , MINSTITUE b , MCOUNTRY c WHERE a.REFERENCE = 1 and a.INSTITUE = b.INSTITUEID and b.COUNTRYID = c.COUNTRYID </SQL> </View> <Level name="countryid" column="COUNTRYID" nameColumn="COUNTRY_TDESC" uniqueMembers="true"> <Property name="countryid" column="COUNTRYID" caption="รหัสประเทศสถาบันการศึกษา"/> </Level> <Level name="institueid" column="INSTITUEID" nameColumn="INSTITUE_TDESC" uniqueMembers="true"> <Property name="institueid" column="INSTITUEID" caption="รหัสสถาบันการศึกษา"/> </Level> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <!-- <Dimension name="time1" type="TimeDimension"> <Hierarchy name="year" hasAll="true" allMemberName="all time" caption="เวลา (ปีปฏิทิน)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO" uniqueMembers="true" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO" nameColumn="QUARTER_DESC" uniqueMembers="false" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO" nameColumn="MONTH_DESC" uniqueMembers="false" levelType="TimeMonths"/> </Hierarchy> </Dimension> --> <Dimension name="time_test" type="TimeDimension" caption="เวลา (ปี-ไตรมาส-เดือน)"> <Hierarchy name="year1" hasAll="true" allMemberName="all time1" allMemberCaption="เวลา (ปีปฏิทิน)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO" uniqueMembers="true" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO" nameColumn="QUARTER_DESC" uniqueMembers="false" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO" nameColumn="MONTH_DESC" uniqueMembers="false" levelType="TimeMonths"/> <Level name="DAY_NO" column="DAY_NO" uniqueMembers="false" type="Numeric" levelType="TimeDays"/> </Hierarchy> </Dimension> <!-- ************************************************************************************************************************************************************** --> <Dimension name="time" type="TimeDimension" caption="เวลา (ปี-ไตรมาส-เดือน)"> <Hierarchy name="year1" hasAll="true" allMemberName="all time1" allMemberCaption="เวลา (ปีปฏิทิน)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO" uniqueMembers="true" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO" nameColumn="QUARTER_DESC" uniqueMembers="false" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO" nameColumn="MONTH_DESC" uniqueMembers="false" levelType="TimeMonths"/> <Level name="DAY_NO" column="DAY_NO" uniqueMembers="false" type="Numeric" levelType="TimeDays"/> </Hierarchy> <!-- <Hierarchy name="year2" hasAll="true" allMemberName="all time2" allMemberCaption="เวลา (ปีงบประมาณ)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO_BUDGET" uniqueMembers="true" type="Numeric" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO_BUDGET" nameColumn="QUARTER_BUDGET_DESC" uniqueMembers="false" type="Numeric" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO_BUDGET" nameColumn="MONTH_DESC" uniqueMembers="false" type="String" levelType="TimeMonths"/> <Level name="DAY_NO" column="DAY_NO" uniqueMembers="false" type="Numeric" levelType="TimeDays"/> </Hierarchy> --> </Dimension> <!-- Share Dimension--> <!-- <Dimension name="time2"> <Hierarchy name="year" hasAll="true" allMemberName="all time" caption="เวลา (ปีงบประมาณ)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO_BUDGET" uniqueMembers="true" type="Numeric" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO_BUDGET" nameColumn="QUARTER_BUDGET_DESC" uniqueMembers="false" type="Numeric" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO_BUDGET" nameColumn="MONTH_DESC" uniqueMembers="false" type="String" levelType="TimeMonths"/> </Hierarchy> </Dimension> --> <!-- Share Dimension--> <Dimension name="diseases" caption="โรค"> <Hierarchy name="diseases" hasAll="true" allMemberName="all diseases" allMemberCaption="รวมทุกโรค" primaryKey="DISID"> <Table name="MDISEASE"/> <Level name="diseases" column="DISID" nameColumn="TDESC" uniqueMembers="true"> <Property name="disid" column="DISID" caption="รหัสโรค"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="company_e" caption="บริษัท"> <Hierarchy name="company" hasAll="true" allMemberName="all company" allMemberCaption="รวมทุกบริษัท" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="COMPANYID" rightKey="COMPANYID"> <Table name="MEMPLOYEE"/> <Table name="MCOMPANY"/> </Join> <Level name="companyid" table="MCOMPANY" column="COMPANYID" nameColumn="TNAME" uniqueMembers="true"> <Property name="companyid" column="COMPANYID" caption="รหัสบริษัท"/> </Level> </Hierarchy> </Dimension> <Dimension name="bu1_e" caption="หน่วยงานระดับ 1"> <Hierarchy name="bu1" hasAll="true" allMemberName="all bu1" allMemberCaption="รวมทุกหน่วยงานระดับ 1" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="BU1" rightKey="BU1ID"> <Table name="MEMPLOYEE"/> <Table name="MBU1"/> </Join> <Level name="bu1id" table="MBU1" column="BU1ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu1id" column="BU1ID" caption="รหัสสำนักงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="bu2_e" caption="หน่วยงานระดับ 2"> <Hierarchy name="bu2" hasAll="true" allMemberName="all bu2" allMemberCaption="รวมทุกหน่วยงานระดับ 2" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="BU2" rightKey="BU2ID"> <Table name="MEMPLOYEE"/> <Table name="MBU2"/> </Join> <Level name="bu2id" table="MBU2" column="BU2ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu2id" column="BU2ID" caption="รหัสศูนย์"/> </Level> </Hierarchy> </Dimension> <Dimension name="bu3_e" caption="หน่วยงานระดับ 3"> <Hierarchy name="bu3" hasAll="true" allMemberName="all bu3" allMemberCaption="รวมทุกหน่วยงานระดับ 3" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="BU3" rightKey="BU3ID"> <Table name="MEMPLOYEE"/> <Table name="MBU3"/> </Join> <Level name="bu3id" table="MBU3" column="BU3ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu3id" column="BU3ID" caption="รหัสฝ่าย"/> </Level> </Hierarchy> </Dimension> <Dimension name="bu4_e" caption="หน่วยงานระดับ 4"> <Hierarchy name="bu4" hasAll="true" allMemberName="all bu4" allMemberCaption="รวมทุกหน่วยงานระดับ 4" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="BU4" rightKey="BU4ID"> <Table name="MEMPLOYEE"/> <Table name="MBU4"/> </Join> <Level name="bu4id" table="MBU4" column="BU4ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu4id" column="BU4ID" caption="งาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="bu5_e" caption="หน่วยงานระดับ 5"> <Hierarchy name="bu5" hasAll="true" allMemberName="all bu5" allMemberCaption="รวมทุกหน่วยงานระดับ 5" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="BU5" rightKey="BU5ID"> <Table name="MEMPLOYEE"/> <Table name="MBU5"/> </Join> <Level name="bu5id" table="MBU5" column="BU5ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="bu5id" column="BU5ID" caption="รหัสหน่วยงานระดับ 5"/> </Level> </Hierarchy> </Dimension> <Dimension name="group_e" caption="กลุ่มพนักงาน"> <Hierarchy name="group" hasAll="true" allMemberName="all group" allMemberCaption="รวมทุกกลุ่มพนักงาน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="EMP_GROUP" rightKey="GROUPID"> <Table name="MEMPLOYEE"/> <Table name="MGROUP"/> </Join> <Level name="groupid" table="MGROUP" column="GROUPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="groupid" column="GROUPID" caption="รหัสกลุ่มพนักงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="position_e" caption="ตำแหน่งพนักงาน"> <Hierarchy name="position" hasAll="true" allMemberName="all position" allMemberCaption="รวมทุกตำแหน่งพนักงาน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="EMP_POSITION" rightKey="POSITIONID"> <Table name="MEMPLOYEE"/> <Table name="MPOSITION"/> </Join> <Level name="positionid" table="MPOSITION" column="POSITIONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="positionid" column="POSITIONID" caption="รหัสตำแหน่งพนักงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="job_e" caption="ลักษณะงาน"> <Hierarchy name="job" hasAll="true" allMemberName="all job" allMemberCaption="รวมทุกลักษณะงาน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="JOB" rightKey="JOBCODEID"> <Table name="MEMPLOYEE"/> <Table name="MJOBCODE"/> </Join> <Level name="jobcodeid" table="MJOBCODE" column="JOBCODEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobcodeid" column="JOBCODEID" caption="รหัสลักษณะงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="time0_e" caption="เวลาการทำงาน"> <Hierarchy name="time0" hasAll="true" allMemberName="all time0" allMemberCaption="รวมทุกเวลาการทำงาน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="TIME0" rightKey="TIME0ID"> <Table name="MEMPLOYEE"/> <Table name="MTIME0"/> </Join> <Level name="time0id" table="MTIME0" column="TIME0ID" nameColumn="TDESC" uniqueMembers="true"> <Property name="time0id" column="TIME0ID" caption="รหัสเวลาการทำงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="national_e" caption="สัญชาติ"> <Hierarchy name="national" hasAll="true" allMemberName="all national" allMemberCaption="รวมทุกสัญชาติ" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="EMP_NATIONAL" rightKey="NATIONALID"> <Table name="MEMPLOYEE"/> <Table name="MNATIONAL"/> </Join> <Level name="nationalid" table="MNATIONAL" column="NATIONALID" nameColumn="TDESC" uniqueMembers="true"> <Property name="nationalid" column="NATIONALID" caption="รหัสสัญชาติ"/> </Level> </Hierarchy> </Dimension> <Dimension name="religion_e" caption="ศาสนา"> <Hierarchy name="religion" hasAll="true" allMemberName="all religion" allMemberCaption="รวมทุกศาสนา" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="RELIGION" rightKey="RELIGIONID"> <Table name="MEMPLOYEE"/> <Table name="MRELIGION"/> </Join> <Level name="religionid" table="MRELIGION" column="RELIGIONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="religionid" column="RELIGIONID" caption="รหัสศาสนา"/> </Level> </Hierarchy> </Dimension> <Dimension name="salatype_e" caption="ระยะเวลาการจ่ายเงิน"> <Hierarchy name="salatype" hasAll="true" allMemberName="all salatype" allMemberCaption="รวมทุกระยะเวลาการจ่ายเงิน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="SALATYPE" rightKey="CODEID"> <Table name="MEMPLOYEE"/> <Table name="MSALATYPE0"/> </Join> <Level name="codeid" table="MSALATYPE0" column="CODEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="codeid" column="CODEID" caption="รหัสระยะเวลาการจ่ายเงิน"/> </Level> </Hierarchy> </Dimension> <Dimension name="project_e" caption="โครงการ"> <Hierarchy name="project" hasAll="true" allMemberName="all project" allMemberCaption="รวมทุกโครงการ" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="PROJECTID" rightKey="PROJECTID"> <Table name="MEMPLOYEE"/> <Table name="MPROJECT"/> </Join> <Level name="projectid" table="MPROJECT" column="PROJECTID" nameColumn="TDESC" uniqueMembers="true"> <Property name="projectid" column="PROJECTID" caption="รหัสโครงการ"/> </Level> </Hierarchy> </Dimension> <!-- ใช้ code ข้างล่างแทน <Dimension name="status_e" caption="สถานภาพพนักงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="STATUS" rightKey="STATUS"> <Table name="MEMPLOYEE"/> <Table name="OLAP_MSTATUS"/> </Join> <Level name="status_grp" table="OLAP_MSTATUS" column="STATUS_GRP" nameColumn="GRP_TDESC" uniqueMembers="true"/> <Level name="status" table="OLAP_MSTATUS" column="STATUS" nameColumn="TDESC" uniqueMembers="true"> <Property name="status" column="STATUS" caption="รหัสสถานภาพพนักงาน"/> </Level> </Hierarchy> </Dimension> --> <Dimension name="status_e" caption="สถานภาพพนักงาน"> <Hierarchy name="status" hasAll="true" allMemberName="all status" allMemberCaption="รวมทุกสถานภาพพนักงาน" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_MEMPLOYEE_MSTATUS"> <SQL dialect="oracle"> SELECT DISTINCT EMPLOYEEID , STATUS , case when STATUS='A' then 'ปรกติ' when STATUS='B' then 'ศึกษาต่อ' when STATUS='S' then 'จ้างผ่านระเบียบพัสดุ' when STATUS='T' then 'ฝึกงาน' when STATUS='V' then 'ทดลองงาน' when STATUS='U' then 'มรณะ' when STATUS='W' then 'พักงาน' when STATUS='X' then 'ปลดออก' when STATUS='Y' then 'ลาออก' when STATUS='Z' then 'เกษียณ' else ' ' end as TDESC , case when STATUS='A' then '1' when STATUS='B' then '1' when STATUS='S' then '1' when STATUS='T' then '1' when STATUS='V' then '1' when STATUS='U' then '0' when STATUS='W' then '0' when STATUS='X' then '0' when STATUS='Y' then '0' when STATUS='Z' then '0' else ' ' end as STATUS_GRP , case when STATUS='A' then 'Active' when STATUS='B' then 'Active' when STATUS='S' then 'Active' when STATUS='T' then 'Active' when STATUS='V' then 'Active' when STATUS='U' then 'non-Active' when STATUS='W' then 'non-Active' when STATUS='X' then 'non-Active' when STATUS='Y' then 'non-Active' when STATUS='Z' then 'non-Active' else ' ' end as GRP_TDESC FROM MEMPLOYEE </SQL> <SQL dialect="mssql"> SELECT DISTINCT EMPLOYEEID , STATUS , case when STATUS='A' then 'ปรกติ' when STATUS='B' then 'ศึกษาต่อ' when STATUS='S' then 'จ้างผ่านระเบียบพัสดุ' when STATUS='T' then 'ฝึกงาน' when STATUS='V' then 'ทดลองงาน' when STATUS='U' then 'มรณะ' when STATUS='W' then 'พักงาน' when STATUS='X' then 'ปลดออก' when STATUS='Y' then 'ลาออก' when STATUS='Z' then 'เกษียณ' else ' ' end as TDESC , case when STATUS='A' then '1' when STATUS='B' then '1' when STATUS='S' then '1' when STATUS='T' then '1' when STATUS='V' then '1' when STATUS='U' then '0' when STATUS='W' then '0' when STATUS='X' then '0' when STATUS='Y' then '0' when STATUS='Z' then '0' else ' ' end as STATUS_GRP , case when STATUS='A' then 'Active' when STATUS='B' then 'Active' when STATUS='S' then 'Active' when STATUS='T' then 'Active' when STATUS='V' then 'Active' when STATUS='U' then 'non-Active' when STATUS='W' then 'non-Active' when STATUS='X' then 'non-Active' when STATUS='Y' then 'non-Active' when STATUS='Z' then 'non-Active' else ' ' end as GRP_TDESC FROM MEMPLOYEE </SQL> </View> <Level name="status_grp" column="STATUS_GRP" nameColumn="GRP_TDESC" uniqueMembers="true"/> <Level name="status" column="STATUS" nameColumn="TDESC" uniqueMembers="true"> <Property name="status" column="STATUS" caption="รหัสสถานภาพพนักงาน"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="fundtable" caption="กองทุน"> <Hierarchy name="fundtable" hasAll="true" allMemberName="all fundtable" allMemberCaption="รวมทุกกองทุน" primaryKey="FUNDTABLEID"> <Table name="MFUNDTABLE"/> <Level name="fundtableid" column="FUNDTABLEID" nameColumn="TDESC" uniqueMembers="true"> <Property name="fundtableid" column="FUNDTABLEID" caption="รหัสกองทุน"/> </Level> </Hierarchy> </Dimension> <Dimension name="employee" caption="ชื่อพนักงาน"> <Hierarchy name="employee" hasAll="true" allMemberName="all employee" allMemberCaption="รวมทุกชื่อพนักงาน" primaryKey="EMPLOYEEID"> <Table name="MEMPLOYEE"/> <Level name="Name" column="EMPLOYEEID" uniqueMembers="false"> <KeyExpression> <SQL dialect="oracle"> "FNAME" || ' ' || "LNAME" </SQL> <SQL dialect="mssql"> FNAME + ' ' + LNAME </SQL> </KeyExpression> <OrdinalExpression> <SQL dialect="oracle"> "FNAME" || ' ' || "LNAME" </SQL> <SQL dialect="mssql"> FNAME + ' ' + LNAME </SQL> </OrdinalExpression> <Property name="employeeid" column="EMPLOYEEID" caption="รหัสพนักงาน"/> </Level> </Hierarchy> </Dimension> <Dimension name="costcenter" caption="Cost center"> <Hierarchy name="costcenter" hasAll="true" allMemberName="all costcenter" allMemberCaption="รวมทุกCost center" primaryKey="COSTCENTERID"> <Table name="MCOSTCENTER0"/> <Level name="costcenterid" column="COSTCENTERID" nameColumn="TDESC" uniqueMembers="true"> <Property name="costcenterid" column="COSTCENTERID" caption="รหัส Cost center"/> </Level> </Hierarchy> </Dimension> <Dimension name="costcenter_e" caption="Cost center"> <Hierarchy name="costcenter" hasAll="true" allMemberName="all costcenter" allMemberCaption="รวมทุกCost center" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="COSTCENTER" rightKey="COSTCENTERID"> <Table name="MEMPLOYEE"/> <Table name="MCOSTCENTER0"/> </Join> <Level name="costcenterid" table="MCOSTCENTER0" column="COSTCENTERID" nameColumn="TDESC" uniqueMembers="true"> <Property name="costcenterid" column="COSTCENTERID" caption="รหัส Cost center"/> </Level> </Hierarchy> </Dimension> <!-- Share Dimension 21/11/2550--> <Dimension name="resignreason" caption="เหตุผลการลาออก"> <Hierarchy name="resignreason" hasAll="true" allMemberName="all resignreason" allMemberCaption="รวมทุกเหตุผลการลาออก" primaryKey="RESIGNREASONID"> <Table name="MRESIGNREASON"/> <Level name="resignreasonid" column="RESIGNREASONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="resignreasonid" column="RESIGNREASONID" caption="รหัสเหตุผลการลาออก"/> </Level> </Hierarchy> </Dimension> <Dimension name="resignreason_e" caption="เหตุผลการลาออก"> <Hierarchy name="resignreason" hasAll="true" allMemberName="all resignreason" allMemberCaption="รวมทุกเหตุผลการลาออก" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="RESIGNREASON" rightKey="RESIGNREASONID"> <Table name="MEMPLOYEE"/> <Table name="MRESIGNREASON"/> </Join> <Level name="resignreasonid" table="MRESIGNREASON" column="RESIGNREASONID" nameColumn="TDESC" uniqueMembers="true"> <Property name="resignreasonid" table="MRESIGNREASON" column="RESIGNREASONID" caption="รหัสเหตุผลการลาออก"/> </Level> </Hierarchy> </Dimension> <Dimension name="eventgrp" caption="ประเภทวัน"> <Hierarchy name="eventgrp" hasAll="true" allMemberName="all eventgrp" allMemberCaption="รวมทุกประเภทวัน" primaryKey="EVENTGRPID"> <Table name="MEVENTGRP"/> <Level name="eventgrpid" column="EVENTGRPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="eventgrpid" column="EVENTGRPID" caption="รหัสประเภทวัน"/> </Level> </Hierarchy> </Dimension> <Dimension name="jobgrade0" caption="กระบอกเงินเดือน"> <Hierarchy name="jobgrade0" hasAll="true" allMemberName="all jobgrade0" primaryKey="JOBCODEID" primaryKeyTable="MJOBCODE"> <Join leftKey="JOBGRADEID" rightKey="JOBGRADEID"> <Table name="MJOBCODE"/> <Table name="MJOBGRADE0"/> </Join> <Level name="jobgradeid" table="MJOBGRADE0" column="jobgradeid" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobgradeid" column="JOBGRADEID" caption="รหัสกระบอกเงินเดือน"/> </Level> </Hierarchy> </Dimension> <Dimension name="jobgrade0_e" caption="กระบอกเงินเดือน"> <Hierarchy name="jobgrade0" hasAll="true" allMemberName="all jobgrade0" allMemberCaption="รวมทุกกระบอกเงินเดือน" primaryKey="EMPLOYEEID" primaryKeyTable="MEMPLOYEE"> <Join leftKey="JOB" rightAlias="MJOBCODE" rightKey="JOBCODEID"> <Table name="MEMPLOYEE"/> <Join leftKey="JOBGRADEID" rightKey="JOBGRADEID"> <Table name="MJOBCODE"/> <Table name="MJOBGRADE0"/> </Join> </Join> <Level name="jobgradeid" table="MJOBGRADE0" column="jobgradeid" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobgradeid" column="jobgradeid" caption="รหัสกระบอกเงินเดือน"/> </Level> </Hierarchy> </Dimension> <!-- <Dimension name="jobgrade0_e" caption="กระบอกเงินเดือน"> <Hierarchy name="jobgrade0" hasAll="true" allMemberName="all jobgrade0" allMemberCaption="รวมทุกกระบอกเงินเดือน" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_JOBGRADE"> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , a.JOB , b.JOBGRADEID , c.TDESC , c.EDESC FROM MEMPLOYEE a , MJOBCODE b , MJOBGRADE0 c WHERE a.JOB=b.JOBCODEID AND b.JOBGRADEID = c.JOBGRADEID </SQL> </View> <Level name="jobgradeid" column="jobgradeid" nameColumn="TDESC" uniqueMembers="true"> <Property name="jobgradeid" column="jobgradeid" caption="รหัสกระบอกเงินเดือน"/> </Level> </Hierarchy> </Dimension> --> <Dimension name="service_year" caption="อายุงาน (ปี)"> <Hierarchy name="service_year" hasAll="true" allMemberName="all service_year" allMemberCaption="รวมทุกอายุงาน" primaryKey="EMPLOYEEID"> <View alias="VIEW_OLAP_SERVICE_YEAR"> <SQL dialect="mssql"> SELECT a.EMPLOYEEID , a.STARTDATE , YEAR(GETDATE()) - YEAR(DATE_ID) + 1as SERVICE_YEAR FROM MEMPLOYEE a , OLAP_TIME b WHERE a.STARTDATE = b.DATE_ID </SQL> </View> <Level name="service_year" column="SERVICE_YEAR" uniqueMembers="true"> </Level> </Hierarchy> </Dimension> <!-- **********************************************Dimension Payroll***************************************************** --> <Dimension name="time_payroll" type="TimeDimension" caption="เวลา (ปี-ไตรมาส-เดือน)"> <Hierarchy name="year" hasAll="true" allMemberName="all time_payroll" allMemberCaption="เวลา (ปีปฏิทิน)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO" uniqueMembers="true" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO" nameColumn="QUARTER_DESC" uniqueMembers="false" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO" nameColumn="MONTH_DESC" uniqueMembers="false" levelType="TimeMonths"/> <!-- <Level name="DAY_NO" column="DAY_NO" uniqueMembers="false" type="Numeric" levelType="TimeDays"/> --> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="startdate" caption="วันเริ่มใช้งาน"> <Hierarchy name="startdate" hasAll="true" allMemberName="all startdate" allMemberCaption="รวมวันเริ่มใช้งาน" primaryKey="PAYROLLID"> <Table name="PAYROLL"/> <Level name="startdate" column="STARTDATE" caption="วันเริ่มใช้งาน" uniqueMembers="false"/> <Property name="employeeid" column=" EMPLOYEEID" caption="รหัสพนักงาน"/> </Hierarchy> </Dimension> <!--********************************************* Dimension Train******************************************************* --> <!-- Share Dimension--> <Dimension name="time3" type="TimeDimension" caption="เวลา (ปี-ไตรมาส-เดือน)"> <Hierarchy name="year" hasAll="true" allMemberName="all time_payroll" allMemberCaption="เวลา (ปีปฏิทิน)" primaryKey="DATE_ID_STR"> <Table name="OLAP_TIME"/> <Level name="year" column="YEAR_NO" uniqueMembers="true" levelType="TimeYears"/> <Level name="quarter" column="QUARTER_NO" nameColumn="QUARTER_DESC" uniqueMembers="false" levelType="TimeQuarters"/> <Level name="month" column="MONTH_NO" nameColumn="MONTH_DESC" uniqueMembers="false" levelType="TimeMonths"/> <!-- <Level name="DAY_NO" column="DAY_NO" uniqueMembers="false" type="Numeric" levelType="TimeDays"/> --> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="CRSEDESC" caption="หัวข้ออบรม"> <Hierarchy name="CRSEDESC" hasAll="true" allMemberName="all CRSEDESC" allMemberCaption="รวมทุกหัวข้ออบรม" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="CRSEDESC" column="CRSEDESC" caption="หัวข้ออบรม" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="detail" caption="เนื้อหาหลักสูตร"> <Hierarchy name="detail" hasAll="true" allMemberName="all เนื้อหาหลักสูตร" allMemberCaption="รวมทุกเนื้อหาหลักสูตร" primaryKey="TRAINID"> <Table name="TRAIN0"/> <Level name="detail" column="DETAIL" caption="เรื่อง" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="crsdesc" caption="ชื่อหลักสูตร"> <Hierarchy name="crsdesc" hasAll="true" allMemberName="all crsdesc" allMemberCaption="รวมชื่อหลักสูตร" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="crsdesc" column="CRSDESC" caption="ชื่อหลักสูตร" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="start_date" caption="วันเริ่มอบรม"> <Hierarchy name="start_date" hasAll="true" allMemberName="all start_date" allMemberCaption="รวมวันเริ่มอบรม" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="start_date" column="START_DATE" caption="วันเริ่มอบรม" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costtrain" caption="ค่าอบรม"> <Hierarchy name="costtrain" hasAll="true" allMemberName="all costtrain" allMemberCaption="รวมค่าอบรม" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costtrain" column="COSTTRAIN" caption="ค่าอบรม" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="locdesc" caption="ชื่อสถานที่"> <Hierarchy name="locdesc" hasAll="true" allMemberName="all locdesc" allMemberCaption="รวมชื่อสถานที่" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="locdesc" column="LOCDESC" caption="ชื่อสถานที่" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="troom_no" caption="ห้องเลขที่"> <Hierarchy name="troom_no" hasAll="true" allMemberName="all troom_no" allMemberCaption="รวมห้องเลขที่" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="troom_no" column="TROOM_NO" caption="ห้องเลขที่" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="instdesc" caption="ชื่อสถาบัน"> <Hierarchy name="instdesc" hasAll="true" allMemberName="all instdesc" allMemberCaption="รวมชื่อสถาบัน" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="instdesc" column="INSTDESC" caption="ชื่อสถาบัน" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="end_date" caption="วันสิ้นสุดการอบรม"> <Hierarchy name="end_date" hasAll="true" allMemberName="all end_date" allMemberCaption="รวมวันสิ้นสุดการอบรม" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="end_date" column="END_DATE" caption="วันสิ้นสุดการอบรม" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costregis" caption="ค่าลงทะเบียน"> <Hierarchy name="costregis" hasAll="true" allMemberName="all costregis" allMemberCaption="รวมค่าลงทะเบียน" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costregis" column="COSTREGIS" caption="ค่าลงทะเบียน" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costroom" caption="ค่าห้อง"> <Hierarchy name="costroom" hasAll="true" allMemberName="all costregis" allMemberCaption="รวมค่าห้อง" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costroom" column="COSTROOM" caption="ค่าห้อง" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costfood" caption="ค่าอาหาร"> <Hierarchy name="costfood" hasAll="true" allMemberName="all costfood" allMemberCaption="รวมค่าอาหาร" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costfood" column="COSTFOOD" caption="ค่าอาหาร" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="coffeebreak" caption="ค่ากาแฟ/อาหารว่าง"> <Hierarchy name="coffeebreak" hasAll="true" allMemberName="all coffeebreak" allMemberCaption="รวมค่ากาแฟ/อาหารว่าง" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="coffeebreak" column="COFFEEBREAK" caption="ค่ากาแฟ/อาหารว่าง" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costtrainer" caption="ค่าวิทยากร"> <Hierarchy name="costtrainer" hasAll="true" allMemberName="all costtrainer" allMemberCaption="รวมค่าวิทยากร" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costtrainer" column="COSTTRAINER" caption="ค่าวิทยากร" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costdoc" caption="ค่าเอกสาร"> <Hierarchy name="costdoc" hasAll="true" allMemberName="all costdoc" allMemberCaption="รวมค่าเอกสาร" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costdoc" column="COSTDOC" caption="ค่าเอกสาร" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension--> <Dimension name="costother" caption="ค่าใช้จ่ายอื่นๆ"> <Hierarchy name="costother" hasAll="true" allMemberName="all costother" allMemberCaption="รวมค่าใช้จ่ายอื่นๆ" primaryKey="TRAINID"> <Table name="TRAIN"/> <Level name="costother" column="COSTOTHER" caption="ค่าใช้จ่ายอื่นๆ" uniqueMembers="false"/> <Property name="trainid" column="TRAINID" caption="รหัสการฝึกอบรม"/> </Hierarchy> </Dimension> <!-- Share Dimension --> <Dimension name="day_type" caption="ประเภทการลา"> <Hierarchy name="day_type" hasAll="true" allMemberName="all day_type" allMemberCaption="รวมประเภทวัน" primaryKey="EVENTGRPID"> <Table name="MEVENTGRP"/> <Level name="eventgrpid" column="EVENTGRPID" nameColumn="TDESC" uniqueMembers="true"> <Property name="eventgrpid" column="EVENTGRPID" caption="รหัสประเภทการลา"/> </Level> </Hierarchy> </Dimension> <!-- * * * * * * * * * * * * * * * * * * * ******************************** * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับจำนวนพนักงานทั่วไป * * * * * * * * * * * * * * * * * * * --> <Cube name="Employee"> <Table name="MEMPLOYEE"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="status" source="status" foreignKey="STATUS"/> <DimensionUsage name="emp_type" source="emp_type" foreignKey="EMP_TYPE"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="job" source="job" foreignKey="JOB"/> <DimensionUsage name="time0" source="time0" foreignKey="TIME0"/> <DimensionUsage name="national" source="national" foreignKey="EMP_NATIONAL"/> <DimensionUsage name="religion" source="religion" foreignKey="RELIGION"/> <DimensionUsage name="salatype" source="salatype" foreignKey="SALATYPE"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project" source="project" foreignKey="PROJECTID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="costcenter" source="costcenter" foreignKey="COSTCENTER"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <DimensionUsage name="costtype" source="costtype" foreignKey="EMPLOYEEID"/> <!-- <DimensionUsage name="resignreason" source="resignreason" foreignKey="RESIGNREASON"/> --> <!-- <Measure name="Employee" caption="พนง." aggregator="count" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."STATUS" IN ('A','B','S','T','V') then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATUS" IN ('A','B','S','T','V') then 1 else 0 end) </SQL> </MeasureExpression> </Measure> --> <Measure name="Employee" column="EMPLOYEEID" caption="พนง." aggregator="count" formatString="Standard"/> <CalculatedMember name="companyEmployee" dimension="Measures" visible="false" formula="([company] , [gender].[all gender] , [bu1].[all bu1] , [bu2].[all bu2] , [bu3].[all bu3] , [bu4].[all bu4] , [bu5].[all bu5] , [group].[all group] , [emp_type].[all emp_type] , [blood].[all blood] , [position].[all position] , [job].[all job] , [time0].[all time0] , [national].[all national] , [religion].[all religion] , [salatype].[all salatype] , [statmarry].[all statmarry] , [project].[all project] , [expertise].[all expertise] , [bank].[all bank] , [current_province].[all current_province] , [degree_e].[all degree] , [major_e].[all major] , [edubackground_e].[all edubackground] , [institue_e].[all institue] , [skill].[all skill] , [costcenter].[all costcenter] , [workarea].[all workarea] , [branch].[all branch] , [employee].[all employee] , [costtype].[all costtype])"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="Percentage" dimension="Measures" formula="([Measures].Employee * 100.00 / [Measures].companyEmployee)" visible="true" caption="พนง. (%)"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับจำนวนพนักงานทั่วไป * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับจำนวนพนักงานลาออก ตามปีปฎิทิน * * * * * * * * * * * * * * * * * * * --> <Cube name="turnover"> <View alias="VIEW_OLAP_MEMPLOYEE_YEAR"> <SQL dialect="oracle"> SELECT a.*, b.EMPLOYEEID , b.STARTDATE , b.RESIGNDATE , case when (a.YEAR_LASTDATE_STR > b.STARTDATE or a.YEAR_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_STR) and a.YEAR_FIRSTFLAG = 1 then 1 else 0 end as YEAR_COUNT , case when (a.YEAR_LASTDATE_STR > b.RESIGNDATE or a.YEAR_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_STR) and a.YEAR_FIRSTFLAG = 1 then 1 else 0 end as YEAR_RESIGN , case when (a.QUARTER_LASTDATE_STR > b.STARTDATE or a.QUARTER_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 then 1 else 0 end as QUARTER_COUNT , case when (a.QUARTER_LASTDATE_STR > b.RESIGNDATE or a.QUARTER_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 then 1 else 0 end as QUARTER_RESIGN , case when (a.MONTH_LASTDATE_STR > b.STARTDATE or a.MONTH_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 then 1 else 0 end as MONTH_COUNT , case when (a.MONTH_LASTDATE_STR > b.RESIGNDATE or a.MONTH_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 then 1 else 0 end as MONTH_RESIGN FROM OLAP_TIME a , MEMPLOYEE b WHERE (a.YEAR_FIRSTFLAG = 1 or a.QUARTER_FIRSTFLAG = 1 or a.MONTH_FIRSTFLAG = 1) </SQL> <SQL dialect="mssql"> SELECT a.*, b.EMPLOYEEID , b.STARTDATE , b.RESIGNDATE , case when (a.YEAR_LASTDATE_STR > b.STARTDATE or a.YEAR_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_STR) and a.YEAR_FIRSTFLAG = 1 then 1 else 0 end as YEAR_COUNT , case when (a.YEAR_LASTDATE_STR > b.RESIGNDATE or a.YEAR_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_STR) and a.YEAR_FIRSTFLAG = 1 then 1 else 0 end as YEAR_RESIGN , case when (a.QUARTER_LASTDATE_STR > b.STARTDATE or a.QUARTER_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 then 1 else 0 end as QUARTER_COUNT , case when (a.QUARTER_LASTDATE_STR > b.RESIGNDATE or a.QUARTER_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 then 1 else 0 end as QUARTER_RESIGN , case when (a.MONTH_LASTDATE_STR > b.STARTDATE or a.MONTH_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 then 1 else 0 end as MONTH_COUNT , case when (a.MONTH_LASTDATE_STR > b.RESIGNDATE or a.MONTH_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 then 1 else 0 end as MONTH_RESIGN FROM OLAP_TIME a , MEMPLOYEE b WHERE (a.YEAR_FIRSTFLAG = 1 or a.QUARTER_FIRSTFLAG = 1 or a.MONTH_FIRSTFLAG = 1) </SQL> </View> <DimensionUsage name="company_e" source="company_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="DATE_ID_STR"/> <!-- <DimensionUsage name="resignreason_e" source="resignreason_e" foreignKey="EMPLOYEEID"/> --> <!-- <CalculatedMember name="companyEmployee" dimension="Measures" visible="false" formula="([company_e] , [gender].[all gender] , [bu1_e].[all bu1] , [bu2_e].[all bu2] , [bu3_e].[all bu3] , [bu4_e].[all bu4] , [bu5_e].[all bu5] , [group_e].[all group] , [emp_type_e].[all emp_type] , [blood].[all blood] , [position_e].[all position] , [job_e].[all job] , [time0_e].[all time0] , [national_e].[all national] , [religion_e].[all religion] , [salatype_e].[all salatype] , [statmarry].[all statmarry] , [project_e].[all project] , [expertise].[all expertise] , [bank].[all bank] , [current_province].[all current_province] , [degree_e].[all degree] , [major_e].[all major] , [edubackground_e].[all edubackground] , [institue_e].[all institue] , [skill].[all skill] "> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> --> <Measure name="year_employee" caption="พนง." column="YEAR_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="year_resign" caption="ออก" column="YEAR_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="quarter_employee" caption="พนง." column="QUARTER_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="quarter_resign" caption="ออก" column="QUARTER_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="month_employee" caption="พนง." column="MONTH_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="month_resign" caption="ออก" column="MONTH_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <CalculatedMember name="year_percentage" dimension="Measures" visible="false" caption="%" formula="Iif([Measures].year_employee=0 , 0 , ([Measures].year_resign / [Measures].year_employee * 100.00))"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="quarter_percentage" dimension="Measures" visible="false" caption="%" formula="Iif([Measures].quarter_employee=0 , 0 , ([Measures].quarter_resign / [Measures].quarter_employee * 100.00))" > <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="month_percentage" dimension="Measures" visible="false" caption="%" formula="Iif([Measures].month_employee=0 , 0 , ([Measures].month_resign / [Measures].month_employee * 100.00))"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="employee" dimension="Measures" visible="true" caption="พนง." formula="Iif(time.CurrentMember.Level is Time.month , [Measures].month_employee , Iif(time.CurrentMember.Level is time.quarter , [Measures].quarter_employee , [Measures].year_employee))"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="resign" dimension="Measures" visible="true" caption="ออก" formula="Iif(time.CurrentMember.Level is time.month , [Measures].month_resign , Iif(time.CurrentMember.Level is time.quarter , [Measures].quarter_resign , [Measures].year_resign))" > <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="percentage" dimension="Measures" visible="true" caption="%" formula="Iif(time.CurrentMember.Level is time.month , [Measures].month_percentage , Iif(time.CurrentMember.Level is time.quarter , [Measures].quarter_percentage , [Measures].year_percentage))"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับจำนวนพนักงานลาออก ตามปีปฎิทิน * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับจำนวนพนักงานลาออก ตามปีงบประมาณ * * * * * * * * * * * * * * * * * * * --> <Cube name="turnover_budget"> <View alias="VIEW_OLAP_MEMPLOYEE_BUDGET"> <SQL dialect="oracle"> SELECT a.*, b.EMPLOYEEID , b.STARTDATE , b.RESIGNDATE , case when a.YEAR_LASTDATE_BUDGET_STR >= b.STARTDATE and b.RESIGNDATE >= a.YEAR_FIRSTDATE_BUDGET_STR and a.YEAR_FIRSTFLAG_BUDGET = 1 and a.ISBUDGET = 1 then 1 else 0 end as YEAR_COUNT , case when a.YEAR_LASTDATE_BUDGET_STR >= b.RESIGNDATE and b.RESIGNDATE >= a.YEAR_FIRSTDATE_BUDGET_STR and a.YEAR_FIRSTFLAG_BUDGET = 1 and a.ISBUDGET = 1 then 1 else 0 end as YEAR_RESIGN , case when a.QUARTER_LASTDATE_STR >= b.STARTDATE and b.RESIGNDATE >= a.QUARTER_FIRSTDATE_STR and a.QUARTER_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as QUARTER_COUNT , case when a.QUARTER_LASTDATE_STR >= b.RESIGNDATE and b.RESIGNDATE >= a.QUARTER_FIRSTDATE_STR and a.QUARTER_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as QUARTER_RESIGN , case when a.MONTH_LASTDATE_STR >= b.STARTDATE and b.RESIGNDATE >= a.MONTH_FIRSTDATE_STR and a.MONTH_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as MONTH_COUNT , case when a.MONTH_LASTDATE_STR >= b.RESIGNDATE and b.RESIGNDATE >= a.MONTH_FIRSTDATE_STR and a.MONTH_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as MONTH_RESIGN FROM OLAP_TIME a , MEMPLOYEE b WHERE (a.YEAR_FIRSTFLAG_BUDGET = 1 or a.QUARTER_FIRSTFLAG = 1 or a.MONTH_FIRSTFLAG = 1) </SQL> <SQL dialect="mssql"> SELECT a.*, b.EMPLOYEEID , b.STARTDATE , b.RESIGNDATE , case when (a.YEAR_LASTDATE_BUDGET_STR > b.STARTDATE or a.YEAR_LASTDATE_BUDGET_STR = b.STARTDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_BUDGET_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_BUDGET_STR) and a.YEAR_FIRSTFLAG_BUDGET = 1 and a.ISBUDGET = 1 then 1 else 0 end as YEAR_COUNT , case when (a.YEAR_LASTDATE_BUDGET_STR > b.RESIGNDATE or a.YEAR_LASTDATE_BUDGET_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.YEAR_FIRSTDATE_BUDGET_STR or b.RESIGNDATE = a.YEAR_FIRSTDATE_BUDGET_STR) and a.YEAR_FIRSTFLAG_BUDGET = 1 and a.ISBUDGET = 1 then 1 else 0 end as YEAR_RESIGN , case when (a.QUARTER_LASTDATE_STR > b.STARTDATE or a.QUARTER_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as QUARTER_COUNT , case when (a.QUARTER_LASTDATE_STR > b.RESIGNDATE or a.QUARTER_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.QUARTER_FIRSTDATE_STR or b.RESIGNDATE = a.QUARTER_FIRSTDATE_STR) and a.QUARTER_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as QUARTER_RESIGN , case when (a.MONTH_LASTDATE_STR > b.STARTDATE or a.MONTH_LASTDATE_STR = b.STARTDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as MONTH_COUNT , case when (a.MONTH_LASTDATE_STR > b.RESIGNDATE or a.MONTH_LASTDATE_STR = b.RESIGNDATE) and (b.RESIGNDATE > a.MONTH_FIRSTDATE_STR or b.RESIGNDATE = a.MONTH_FIRSTDATE_STR) and a.MONTH_FIRSTFLAG = 1 and a.ISBUDGET = 1 then 1 else 0 end as MONTH_RESIGN FROM OLAP_TIME a , MEMPLOYEE b WHERE (a.YEAR_FIRSTFLAG_BUDGET = 1 or a.QUARTER_FIRSTFLAG = 1 or a.MONTH_FIRSTFLAG = 1) </SQL> </View> <DimensionUsage name="company_e" source="company_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="DATE_ID_STR"/> <Measure name="year_employee" caption="พนง." column="YEAR_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="year_resign" caption="ออก" column="YEAR_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="quarter_employee" caption="พนง." column="QUARTER_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="quarter_resign" caption="ออก" column="QUARTER_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="month_employee" caption="พนง." column="MONTH_COUNT" aggregator="sum" visible="false" formatString="Standard"/> <Measure name="month_resign" caption="ออก" column="MONTH_RESIGN" aggregator="sum" visible="false" formatString="Standard"/> <CalculatedMember name="year_percentage" dimension="Measures" formula="Iif([Measures].year_employee=0 , 0 , ([Measures].year_resign / [Measures].year_employee * 100.00))" visible="false" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="quarter_percentage" dimension="Measures" formula="Iif([Measures].quarter_employee=0 , 0 , ([Measures].quarter_resign / [Measures].quarter_employee * 100.00))" visible="false" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="month_percentage" dimension="Measures" formula="Iif([Measures].month_employee=0, 0 , ([Measures].month_resign / [Measures].month_employee * 100.00))" visible="false" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="employee" dimension="Measures" formula="Iif(time.CurrentMember.Level is time.month , [Measures].month_employee , Iif(time.CurrentMember.Level is time.quarter , [Measures].quarter_employee , [Measures].year_employee))" visible="true" caption="พนง."> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="resign" dimension="Measures" formula="Iif([time].CurrentMember.Level is [time].month , [Measures].month_resign , Iif([time].CurrentMember.Level is [time].quarter , [Measures].quarter_resign , [Measures].year_resign))" visible="true" caption="ออก"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="percentage" dimension="Measures" formula="Iif([time].CurrentMember.Level is [time].month , [Measures].month_percentage , Iif([time].CurrentMember.Level is [time].quarter , [Measures].quarter_percentage , [Measures].year_percentage))" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับจำนวนพนักงานลาออก ตามปีงบประมาณ * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับช่วงอายุ * * * * * * * * * * * * * * * * * * * --> <Cube name="EmployeeAge"> <Table name="MEMPLOYEE"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="status" source="status" foreignKey="STATUS"/> <DimensionUsage name="emp_type" source="emp_type" foreignKey="EMP_TYPE"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="job" source="job" foreignKey="JOB"/> <DimensionUsage name="time0" source="time0" foreignKey="TIME0"/> <DimensionUsage name="national" source="national" foreignKey="EMP_NATIONAL"/> <DimensionUsage name="religion" source="religion" foreignKey="RELIGION"/> <DimensionUsage name="salatype" source="salatype" foreignKey="SALATYPE"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project" source="project" foreignKey="PROJECTID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="costcenter" source="costcenter" foreignKey="COSTCENTER"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <Measure name="ageAll" column="EMPLOYEEID" caption="รวม" aggregator="count" formatString="Standard"/> <!-- <Measure name="ageAll" caption="รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "MEMPLOYEE"."STATUS" IN ('A','B','S','T','V') then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "MEMPLOYEE"."STATUS" IN ('A','B','S','T','V') then 1 else 0 end) </SQL> </MeasureExpression> </Measure> --> <Measure name="age1" caption="20-24" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1900-01-01' and '1960-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1900-01-01' and '1960-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age2" caption="25-29" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1961-01-01' and '1965-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1961-01-01' and '1965-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age3" caption="30-34" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1966-01-01' and '1970-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1966-01-01' and '1970-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age4" caption="35-39" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1971-01-01' and '1975-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1971-01-01' and '1975-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age5" caption="40-44" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1976-01-01' and '1980-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1976-01-01' and '1980-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age6" caption="45-49" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1981-01-01' and '1985-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1981-01-01' and '1985-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age7" caption="50-54" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1986-01-01' and '1990-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1986-01-01' and '1990-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age8" caption="55-59" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1991-01-01' and '1995-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1991-01-01' and '1995-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age9" caption="60-64" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '1996-01-01' and '2000-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '1996-01-01' and '2000-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <Measure name="age10" caption="65 ->" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">case when "BIRTHDAY" between '2001-01-01' and '9999-12-31' then 1 else 0 end</SQL> <SQL dialect="mssql">case when "BIRTHDAY" between '2001-01-01' and '9999-12-31' then 1 else 0 end</SQL> </MeasureExpression> </Measure> <CalculatedMember name="companyEmployee" dimension="Measures" formula="([company] , [gender].[all gender] , [bu1].[all bu1] , [bu2].[all bu2] , [bu3].[all bu3] , [bu4].[all bu4] , [bu5].[all bu5] , [group].[all group] , [emp_type].[all emp_type] , [blood].[all blood] , [position].[all position] , [job].[all job] , [time0].[all time0] , [national].[all national] , [religion].[all religion] , [salatype].[all salatype] , [statmarry].[all statmarry] , [project].[all project] , [expertise].[all expertise] , [bank].[all bank] , [current_province].[all current_province] , [degree_e].[all degree] , [major_e].[all major] , [edubackground_e].[all edubackground] , [institue_e].[all institue] , [skill].[all skill] , [costcenter].[all costcenter] , [workarea].[all workarea] , [branch].[all branch] , [employee].[all employee])" visible="false"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="age1Percentage" dimension="Measures" formula="([Measures].age1 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age2Percentage" dimension="Measures" formula="([Measures].age2 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age3Percentage" dimension="Measures" formula="([Measures].age3 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age4Percentage" dimension="Measures" formula="([Measures].age4 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age5Percentage" dimension="Measures" formula="([Measures].age5 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age6Percentage" dimension="Measures" formula="([Measures].age6 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age7Percentage" dimension="Measures" formula="([Measures].age7 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age8Percentage" dimension="Measures" formula="([Measures].age8 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age9Percentage" dimension="Measures" formula="([Measures].age9 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="age10Percentage" dimension="Measures" formula="([Measures].age10 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับช่วงอายุ * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับจำนวนการใช้ห้องพยาบาล * * * * * * * * * * * * * * * * * * * --> <Cube name="EmployeeEr"> <Table name="ER_HT_ROOM_USE_MASTER"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="USE_DATE"/> <Measure name="Employee" column="EMPLOYEEID" caption="จำนวนการใช้ห้องพยาบาล" aggregator="count" formatString="###,###,###.##"/> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับจำนวนการใช้ห้องพยาบาล * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับการนับค่ารักษาพยาบาล * * * * * * * * * * * * * * * * * * * --> <Cube name="EmployeeErCost"> <Table name="MCOMPLAIN"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="APPROVEDATE"/> <DimensionUsage name="sitewel" source="sitewel" foreignKey="SITEWELID"/> <Measure name="Cost" column="COST" caption="รวม" aggregator="sum" formatString="###,###,###.##"/> <Measure name="EmpCost" caption="ตนเอง" aggregator="sum" datatype="Numeric" formatString="###,###,###.##"> <MeasureExpression> <SQL dialect="oracle">(case when "GAINERID" IS NULL OR "GAINERID" = '' then "COST" else 0 end)</SQL> <SQL dialect="mssql">(case when "GAINERID" IS NULL OR "GAINERID" = '' then "COST" else 0 end)</SQL> </MeasureExpression> </Measure> <Measure name="FamilyCost" caption="บุคคลในครอบครัว" aggregator="sum" datatype="Numeric" formatString="###,###,###.##"> <MeasureExpression> <SQL dialect="oracle">(case when "GAINERID" IS NOT NULL OR "GAINERID" > '' then "COST" else 0 end)</SQL> <SQL dialect="mssql">(case when "GAINERID" IS NOT NULL OR "GAINERID" > '' then "COST" else 0 end)</SQL> </MeasureExpression> </Measure> <CalculatedMember name="yearCost" dimension="Measures" formula="([company] , [gender].[all gender] , [bu1_e].[all bu1] , [bu2_e].[all bu2] , [bu3_e].[all bu3] , [bu4_e].[all bu4] , [bu5_e].[all bu5] , [group_e].[all group] , [status_e].[all status] , [emp_type_e].[all emp_type] , [blood].[all blood] , [position_e].[all position] , [job_e].[all job] , [time0_e].[all time0] , [national_e].[all national] , [religion_e].[all religion] , [salatype_e].[all salatype] , [statmarry].[all statmarry] , [project_e].[all project] , [expertise].[all expertise] , [bank].[all bank] , [current_province].[all current_province] , [degree_e].[all degree] , [major_e].[all major] , [edubackground_e].[all edubackground] , [institue_e].[all institue] , [skill].[all skill] , [time].CurrentMember , [sitewel].[all sitewel])" visible="false"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="empCostPercentage" dimension="Measures" formula="[Measures].EmpCost * 100.00 / [Measures].yearCost" visible="true" caption="ตนเอง (%)"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="FamilyCostPercentage" dimension="Measures" formula="[Measures].FamilyCost * 100.00 / [Measures].yearCost" visible="true" caption="บุคคลในครอบครัว (%)"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="CostPercentage" dimension="Measures" formula="[Measures].Cost * 100.00 / [Measures].yearCost" visible="true" caption="รวม (%)"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับค่ารักษาพยาบาล * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับการจัดการงานศพ * * * * * * * * * * * * * * * * * * * --> <Cube name="Cremation"> <Table name="ER_CREMATION"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="OWNER_DATE"/> <Measure name="head_money" column="HEAD_MONEY" caption="จำนวนเงิน" aggregator="sum" formatString="###,###,##0.00"/> <Measure name="other_money" column="OTHER_MONEY" caption="จำนวนครั้ง" aggregator="count" formatString="###,###"/> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการจัดการงานศพ * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับเงินสะสมกองทุนสำรองเลี้ยงชีพ * * * * * * * * * * * * * * * * * * * --> <Cube name="pvf"> <Table name="TPVF_HIS"/> <!-- <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time1" source="time1" foreignKey="GENDATE"/> <DimensionUsage name="fundtable" source="fundtable" foreignKey="FUNDTABLEID"/> --> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="time0" source="time0" foreignKey="TIME0ID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype" source="salatype" foreignKey="SALATYPE"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="GENDATE"/> <DimensionUsage name="fundtable" source="fundtable" foreignKey="FUNDTABLEID"/> <DimensionUsage name="costcenter" source="costcenter" foreignKey="COSTCENTER"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <Measure name="Employee" column="EMPLOYEEID" caption="คน" aggregator="count" formatString="###,##0"/> <Measure name="Emplamount" caption="เงินสะสม" aggregator="sum" formatString="##,###,###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"EMPLAMOUNT"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , EMPLAMOUNT)</SQL> </MeasureExpression> </Measure> <Measure name="Compamount" caption="เงินสมทบ" aggregator="sum" formatString="##,###,###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">COMPAMOUNT</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , COMPAMOUNT)</SQL> </MeasureExpression> </Measure> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบสำหรับเงินสะสมกองทุนสำรองเลี้ยงชีพ * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * สำหรับนับเกรด * * * * * * * * * * * * * * * * * * * --> <Cube name="gpa"> <View alias="VIEW_OLAP_MEMPL_EDUCATE"> <SQL dialect="oracle"> SELECT EMPLOYEEID , COMPANYID, DEGREEID , MAJORID , BACKGROUNDID , INSTITUE , GPA FROM MEMPL_EDUCATE WHERE REFERENCE = 1 </SQL> <SQL dialect="mssql"> SELECT EMPLOYEEID , COMPANYID, DEGREEID , MAJORID , BACKGROUNDID , INSTITUE , GPA FROM MEMPL_EDUCATE WHERE REFERENCE = 1 </SQL> </View> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu3_e" source="bu3_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu4_e" source="bu4_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu5_e" source="bu5_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="group_e" source="group_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="status_e" source="status_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="emp_type_e" source="emp_type_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position_e" source="position_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="job_e" source="job_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time0_e" source="time0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="national_e" source="national_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="religion_e" source="religion_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="salatype_e" source="salatype_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project_e" source="project_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree" source="degree" foreignKey="DEGREEID"/> <DimensionUsage name="major" source="major" foreignKey="MAJORID"/> <DimensionUsage name="edubackground" source="edubackground" foreignKey="BACKGROUNDID"/> <DimensionUsage name="institue" source="institue" foreignKey="INSTITUE"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="costcenter_e" source="costcenter_e" foreignKey="EMPLOYEEID"/> <Measure name="employee" column="EMPLOYEEID" aggregator="count" formatString="Standard"/> <Measure name="grade1" caption="1.00 - 1.50" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 1.00 AND 1.50 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 1.00 AND 1.50 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="grade2" caption=">1.50 - 2.00" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 1.51 AND 2.00 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 1.51 AND 2.00 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="grade3" caption=">2.00 - 2.50" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 2.01 AND 2.50 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 2.01 AND 2.50 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="grade4" caption=">2.50 - 3.00" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 2.51 AND 3.00 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 2.51 AND 3.00 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="grade5" caption=">3.00 - 3.50" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 3.01 AND 3.50 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 3.01 AND 3.50 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="grade6" caption=">3.50 - 4.00" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "GPA" BETWEEN 3.51 AND 4.00 then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "GPA" BETWEEN 3.51 AND 4.00 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <CalculatedMember name="companyEmployee" dimension="Measures" formula="([company] , [gender].[all gender] , [bu1_e].[all bu1] , [bu2_e].[all bu2] , [bu3_e].[all bu3] , [bu4_e].[all bu4] , [bu5_e].[all bu5] , [group_e].[all group] , [emp_type_e].[all emp_type] , [blood].[all blood] , [position_e].[all position] , [job_e].[all job] , [time0_e].[all time0] , [national_e].[all national] , [religion_e].[all religion] , [salatype_e].[all salatype] , [statmarry].[all statmarry] , [project_e].[all project] , [expertise].[all expertise] , [bank].[all bank] , [current_province].[all current_province] , [degree].[all degree] , [major].[all major] , [edubackground].[all edubackground] , [institue].[all institue] , [skill].[all skill] , [costcenter_e].[all costcenter])" visible="true"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="grade1Percentage" dimension="Measures" formula="([Measures].grade1 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="grade2Percentage" dimension="Measures" formula="([Measures].grade2 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="grade3Percentage" dimension="Measures" formula="([Measures].grade3 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="grade4Percentage" dimension="Measures" formula="([Measures].grade4 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="grade5Percentage" dimension="Measures" formula="([Measures].grade5 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> <CalculatedMember name="grade6Percentage" dimension="Measures" formula="([Measures].grade6 * 100.00 / [Measures].companyEmployee)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบการนับเกรด * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * ย้ายตำแหน่ง * * * * * * * * * * * * * * * * * * * --> <Cube name="employeeMovement"> <View alias="VIEW_MEMPL_MOVEMENT"> <SQL dialect="oracle"> SELECT b.OLD_BU1 as OLD_BU1 , b.BU1 as NEW_BU1 , b.OLD_BU2 as OLD_BU2 , b.BU2 as NEW_BU2 , b.OLD_BU3 as OLD_BU3 , b.bu3 as NEW_BU3 , b.OLD_BU4 as OLD_BU4 , b.BU4 as NEW_BU4 , b.OLD_BU5 as OLD_BU5 , b.BU5 as NEW_BU5 , b.OLD_EMP_POSITION as OLD_EMP_POSITION , b.EMP_POSITION as NEW_EMP_POSITION , b.OLD_EMP_GROUP as OLD_EMP_GROUP , b.EMP_GROUP as NEW_EMP_GROUP , b.OLD_EMP_TYPE as OLD_EMP_TYPE , b.EMP_TYPE as NEW_EMP_TYPE , b.OLD_BRANCH as OLD_BRANCH , b.BRANCH as NEW_BRANCH , b.OLD_WORKAREA as OLD_WORKAREA , b.WORKAREA as NEW_WORKAREA , b.OLD_STATUS as OLD_STATUS , b.STATUS as NEW_STATUS , b.OLD_TIME0 as OLD_TIME0 , b.TIME0 as NEW_TIME0 , b.OLD_JOB as OLD_JOB , b.JOB as NEW_JOB , b.OLD_SALATYPE as OLD_SALATYPE , b.SALATYPE as NEW_SALATYPE , a.EMPLOYEEID , a.COMPANYID , a.EVENT , a.BU1 , a.BU2 , a.BU3 , a.BU4 , a.BU5 , a.EMP_TYPE , a.EMP_GROUP , a.EMP_POSITION , a.BRANCH , a.WORKAREA , a.ADJ_TYPE , SUBSTR(a.EFF_DATE , 1 , 10) AS EFF_DATE FROM MEMPL_MOVEMENT a LEFT OUTER JOIN HADJPOSITION b on a.EMPLOYEEID = b.EMPLOYEEID and SUBSTR(a.EFF_DATE , 1 , 10) = SUBSTR(b.EFF_DATE , 1 , 10) and a.COMPANYID = b.COMPANYID </SQL> <SQL dialect="mssql"> SELECT b.OLD_BU1 as OLD_BU1 , b.BU1 as NEW_BU1 , b.OLD_BU2 as OLD_BU2 , b.BU2 as NEW_BU2 , b.OLD_BU3 as OLD_BU3 , b.bu3 as NEW_BU3 , b.OLD_BU4 as OLD_BU4 , b.BU4 as NEW_BU4 , b.OLD_BU5 as OLD_BU5 , b.BU5 as NEW_BU5 , b.OLD_EMP_POSITION as OLD_EMP_POSITION , b.EMP_POSITION as NEW_EMP_POSITION , b.OLD_EMP_GROUP as OLD_EMP_GROUP , b.EMP_GROUP as NEW_EMP_GROUP , b.OLD_EMP_TYPE as OLD_EMP_TYPE , b.EMP_TYPE as NEW_EMP_TYPE , b.OLD_BRANCH as OLD_BRANCH , b.BRANCH as NEW_BRANCH , b.OLD_WORKAREA as OLD_WORKAREA , b.WORKAREA as NEW_WORKAREA , b.OLD_STATUS as OLD_STATUS , b.STATUS as NEW_STATUS , b.OLD_TIME0 as OLD_TIME0 , b.TIME0 as NEW_TIME0 , b.OLD_JOB as OLD_JOB , b.JOB as NEW_JOB , b.OLD_SALATYPE as OLD_SALATYPE , b.SALATYPE as NEW_SALATYPE , a.EMPLOYEEID , a.COMPANYID , a.EVENT , a.BU1 , a.BU2 , a.BU3 , a.BU4 , a.BU5 , a.EMP_TYPE , a.EMP_GROUP , a.EMP_POSITION , a.BRANCH , a.WORKAREA , a.ADJ_TYPE , LEFT(a.EFF_DATE , 10) AS EFF_DATE FROM MEMPL_MOVEMENT a LEFT OUTER JOIN HADJPOSITION b on a.EMPLOYEEID = b.EMPLOYEEID and LEFT(a.EFF_DATE , 10) = LEFT(b.EFF_DATE , 10) and a.COMPANYID = b.COMPANYID </SQL> </View> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="emp_type" source="emp_type" foreignKey="EMP_TYPE"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <DimensionUsage name="time" source="time" foreignKey="EFF_DATE"/> <!-- <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> --> <Measure name="employee" caption="เปลี่ยนแปลง รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">"EVENT"</SQL> <SQL dialect="mssql">"EVENT"</SQL> </MeasureExpression> </Measure> <Measure name="MoveIn" caption="ย้ายเข้า รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">(case when "EVENT" = 1 and "ADJ_TYPE" = '2' then 1 else 0 end)</SQL> <SQL dialect="mssql">(case when "EVENT" = 1 and "ADJ_TYPE" = '2' then 1 else 0 end)</SQL> </MeasureExpression> </Measure> <Measure name="MoveOut" caption="ย้ายออก รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">(case when "EVENT" = -1 and "ADJ_TYPE" = '2' then 1 else 0 end)</SQL> <SQL dialect="mssql">(case when "EVENT" = -1 and "ADJ_TYPE" = '2' then 1 else 0 end)</SQL> </MeasureExpression> </Measure> <Measure name="New" caption="เข้าใหม่ รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">(case when "EVENT" = 1 and "ADJ_TYPE" = '1' then 1 else 0 end)</SQL> <SQL dialect="mssql">(case when "EVENT" = 1 and "ADJ_TYPE" = '1' then 1 else 0 end)</SQL> </MeasureExpression> </Measure> <Measure name="Out" caption="ออก รวม" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle">(case when "EVENT" = -1 and "ADJ_TYPE" = '3' then 1 else 0 end)</SQL> <SQL dialect="mssql">(case when "EVENT" = -1 and "ADJ_TYPE" = '3' then 1 else 0 end)</SQL> </MeasureExpression> </Measure> <Measure name="MoveInPosition" caption="ย้ายเข้า (ตำแหน่ง)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_EMP_POSITION" != "NEW_EMP_POSITION" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 AND "ADJ_TYPE" = '2' AND "OLD_EMP_POSITION" != "NEW_EMP_POSITION" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutPosition" caption="ย้ายออก (ตำแหน่ง)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_POSITION" != "NEW_EMP_POSITION" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_POSITION" != "NEW_EMP_POSITION" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBu1" caption="ย้ายเข้า (สำนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU1" != "NEW_BU1" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU1" != "NEW_BU1" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBu1" caption="ย้ายออก (สำนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU1" != "NEW_BU1" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU1" != "NEW_BU1" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBu2" caption="ย้ายเข้า (ศูนย์)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU2" != "NEW_BU2" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU2" != "NEW_BU2" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBu2" caption="ย้ายออก (ศูนย์)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU2" != "NEW_BU2" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU2" != "NEW_BU2" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBu3" caption="ย้ายเข้า (ฝ่าย)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU3"!="NEW_BU3" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU3"!="NEW_BU3" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBu3" caption="ย้ายออก (ฝ่าย)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU3" != "NEW_BU3" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU3" != "NEW_BU3" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBu4" caption="ย้ายเข้า (งาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU4" != "NEW_BU4" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU4" != "NEW_BU4" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBu4" caption="ย้ายออก (งาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU4" != "NEW_BU4" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU4" != "NEW_BU4" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBu5" caption="ย้ายเข้า (ระดับ 5)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU5" != "NEW_BU5" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BU5" != "NEW_BU5" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBu5" caption="ย้ายออก (ระดับ 5)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU5" != "NEW_BU5" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BU5" != "NEW_BU5" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInEmp_Group" caption="ย้ายเข้า (กลุ่มพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_EMP_GROUP" != "NEW_EMP_GROUP" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_EMP_GROUP" != "NEW_EMP_GROUP" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutEmp_Group" caption="ย้ายออก (กลุ่มพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_GROUP" != "NEW_EMP_GROUP" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_GROUP" != "NEW_EMP_GROUP" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInEmp_type" caption="ย้ายเข้า (ประเภทพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_EMP_TYPE" != "NEW_EMP_TYPE" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_EMP_TYPE" != "NEW_EMP_TYPE" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutEmp_type" caption="ย้ายออก (ประเภทพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_TYPE" != "NEW_EMP_TYPE" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_EMP_TYPE" != "NEW_EMP_TYPE" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInBranch" caption="ย้ายเข้า (สาขา)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BRANCH" != "NEW_BRANCH" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_BRANCH" != "NEW_BRANCH" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutBranch" caption="ย้ายออก (สาขา)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BRANCH" != "NEW_BRANCH" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_BRANCH" != "NEW_BRANCH" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInWorkArea" caption="ย้ายเข้า (สถานที่ทำงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT"=1 and "ADJ_TYPE"='2' and "OLD_WORKAREA" != "NEW_WORKAREA" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT"=1 and "ADJ_TYPE"='2' and "OLD_WORKAREA" != "NEW_WORKAREA" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutWorkArea" caption="ย้ายออก (สถานที่ทำงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT"= -1 and "ADJ_TYPE"='2' and "OLD_WORKAREA" != "NEW_WORKAREA" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT"= -1 and "ADJ_TYPE"='2' and "OLD_WORKAREA" != "NEW_WORKAREA" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInStatus" caption="ย้ายเข้า (สถานะภาพพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_STATUS" != "NEW_STATUS" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_STATUS" != "NEW_STATUS" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutStatus" caption="ย้ายออก (สถานะภาพพนักงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_STATUS" != "NEW_STATUS" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_STATUS" != "NEW_STATUS" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInTime0" caption="ย้ายเข้า (เวลาการทำงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_TIME0" != "NEW_TIME0" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_TIME0" != "NEW_TIME0" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutTime0" caption="ย้ายออก (เวลาการทำงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_TIME0" != "NEW_TIME0" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_TIME0" != "NEW_TIME0" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInJob" caption="ย้ายเข้า (ลักษณะงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_JOB" != "NEW_JOB" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_JOB" != "NEW_JOB" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutJob" caption="ย้ายออก (ลักษณะงาน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_JOB" != "NEW_JOB" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_JOB" != "NEW_JOB" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveInSalatype" caption="ย้ายเข้า (ระยะเวลาการจ่ายเงิน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_SALATYPE" != "NEW_SALATYPE" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = 1 and "ADJ_TYPE" = '2' and "OLD_SALATYPE" != "NEW_SALATYPE" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="MoveOutSalatype" caption="ย้ายออก (ระยะเวลาการจ่ายเงิน)" aggregator="sum" datatype="Numeric" formatString="Standard"> <MeasureExpression> <SQL dialect="oracle"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_SALATYPE" != "NEW_SALATYPE" then 1 else 0 end) </SQL> <SQL dialect="mssql"> (case when "EVENT" = -1 and "ADJ_TYPE" = '2' and "OLD_SALATYPE" != "NEW_SALATYPE" then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <!-- ใช้ได้ เปรียบเทียบ 2 ค่าในคาบเวลาเดียวกัน <CalculatedMember name="ParallelPeriod" dimension="Measures" formula="(ParallelPeriod(year , 1 , time1.CurrentMember) , [Measures].employee)" visible="true" caption="ParallelPeriod"> </CalculatedMember> --> <!-- ใช้ได้ นับสะสมของแต่ละปี <CalculatedMember name="acc" dimension="Measures" formula="Sum(Ytd(time1.CurrentMember) , [Measures].employee)" visible="true" caption="acc"> </CalculatedMember> --> <!-- ใช้ได้ นับสะสม ทั้งหมด --> <CalculatedMember name="employee_count" dimension="Measures" formula="(time.CurrentMember , [Measures].employee) + (time.PrevMember , [Measures].employee_count)" visible="true" caption="พนง.รวม"> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบ ย้ายตำแหน่ง * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * ข้อมูลเงินเดือน * * * * * * * * * * * * * * * * * * * --> <Cube name="Salary"> <Table name="MEMPLOYEE"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="status" source="status" foreignKey="STATUS"/> <DimensionUsage name="emp_type" source="emp_type" foreignKey="EMP_TYPE"/> <DimensionUsage name="blood" source="blood" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="job" source="job" foreignKey="JOB"/> <DimensionUsage name="time0" source="time0" foreignKey="TIME0"/> <DimensionUsage name="national" source="national" foreignKey="EMP_NATIONAL"/> <DimensionUsage name="religion" source="religion" foreignKey="RELIGION"/> <DimensionUsage name="salatype" source="salatype" foreignKey="SALATYPE"/> <DimensionUsage name="statmarry" source="statmarry" foreignKey="EMPLOYEEID"/> <DimensionUsage name="project" source="project" foreignKey="PROJECTID"/> <DimensionUsage name="expertise" source="expertise" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bank" source="bank" foreignKey="EMPLOYEEID"/> <DimensionUsage name="current_province" source="current_province" foreignKey="EMPLOYEEID"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="skill" source="skill" foreignKey="EMPLOYEEID"/> <DimensionUsage name="costcenter" source="costcenter" foreignKey="COSTCENTER"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <Measure name="Employee" column="EMPLOYEEID" caption="พนง." aggregator="count" type="String" formatString="Standard"/> <Measure name="salaryCount" caption="เงินเดือน" aggregator="count" formatString="###,###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"SALARY"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , SALARY)</SQL> </MeasureExpression> </Measure> <Measure name="salarySum" caption="เงินเดือนรวม" aggregator="sum" formatString="###,###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"SALARY"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , SALARY)</SQL> </MeasureExpression> </Measure> <Measure name="salaryMin" caption="เงินเดือนน้อยสุด" aggregator="min" formatString="###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"SALARY"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , SALARY)</SQL> </MeasureExpression> </Measure> <Measure name="salaryAvg" caption="เงินเดือนเฉลี่ย" aggregator="avg" formatString="###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"SALARY"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , SALARY)</SQL> </MeasureExpression> </Measure> <Measure name="salaryMax" caption="เงินเดือนมากสุด" aggregator="max" formatString="###,###,##0.00"> <MeasureExpression> <SQL dialect="oracle">"SALARY"</SQL> <SQL dialect="mssql">CONVERT(NUMERIC(17 , 2) , SALARY)</SQL> </MeasureExpression> </Measure> <CalculatedMember name="salaryMid" dimension="Measures" visible="true" caption="เงินเดือนกลาง" formula="Median([employee].Children , [Measures].salarySum)"> <CalculatedMemberProperty name="FORMAT_STRING" value="###,###,##0.00"/> </CalculatedMember> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบข้อมูลเงินเดือน * * * * * * * * * * * * * * * * * * * --> <!-- * * * * * * * * * * * * * * * * * * * ข้อมูลการทำงาน * * * * * * * * * * * * * * * * * * * --> <Cube name="time_current"> <View alias="VIEW_OLAP_TTIME_CURRENT"> <SQL dialect="oracle"> SELECT EMPLOYEEID, LT , M_LV , OT1 , OT5 , OT2 , OT3 , COMPANYID, BRANCH , DATEID, TIME0ID , EVENTGRP , BU1 , BU2 , BU3 , BU4 , BU5 , EMP_POSITION , EMP_GROUP, JOBCODE , COSTCENTER , SALATYPE , WORKAREA , SOURCE_IN , SOURCE_OUT FROM TTIME_CURRENT1 </SQL> <SQL dialect="mssql"> SELECT EMPLOYEEID, LT , M_LV , OT1 , OT5 , OT2 , OT3 , COMPANYID, BRANCH , DATEID, TIME0ID , EVENTGRP , BU1 , BU2 , BU3 , BU4 , BU5 , EMP_POSITION , EMP_GROUP, JOBCODE , COSTCENTER , SALATYPE , WORKAREA , SOURCE_IN , SOURCE_OUT FROM TTIME_CURRENT1 </SQL> </View> <DimensionUsage name="bu1" source="bu1" foreignKey="BU1"/> <DimensionUsage name="bu2" source="bu2" foreignKey="BU2"/> <DimensionUsage name="costcenter" source="costcenter" foreignKey="COSTCENTER"/> <DimensionUsage name="position" source="position" foreignKey="EMP_POSITION"/> <DimensionUsage name="workarea" source="workarea" foreignKey="WORKAREA"/> <DimensionUsage name="time0" source="time0" foreignKey="TIME0ID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="eventgrp" source="eventgrp" foreignKey="EVENTGRP"/> <DimensionUsage name="degree_e" source="degree_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="major_e" source="major_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="edubackground_e" source="edubackground_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="institue_e" source="institue_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="jobgrade0_e" source="jobgrade0_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="service_year" source="service_year" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time" source="time" foreignKey="DATEID"/> <!-- <DimensionUsage name="job" source="job" foreignKey="JOBCODE"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="bu3" source="bu3" foreignKey="BU3"/> <DimensionUsage name="bu4" source="bu4" foreignKey="BU4"/> <DimensionUsage name="bu5" source="bu5" foreignKey="BU5"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <DimensionUsage name="salatype" source="salatype" foreignKey="SALATYPE"/> <DimensionUsage name="branch" source="branch" foreignKey="BRANCH"/> <DimensionUsage name="time" source="time" foreignKey="DATEID"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> --> <Measure name="Employee" column="EMPLOYEEID" caption="พนง." aggregator="distinct-count" type="String" formatString="Standard"/> <Measure name="lt_count" aggregator="sum" formatString="###,###,###.##" caption="สาย (ครั้ง)"> <MeasureExpression> <SQL dialect="mssql"> (case when "LT" > 0 then 1 else 0 end) </SQL> </MeasureExpression> </Measure> <Measure name="lt" aggregator="sum" formatString="###,###,###.##" caption="ชม. สาย (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "LT") + ("LT" - CONVERT(NUMERIC(17 , 0 ) , "LT")) / 0.60 </SQL> </MeasureExpression> </Measure> <Measure name="lv" aggregator="sum" formatString="###,###,###.##" caption="ชม. ลา (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "M_LV") + ("M_LV" - CONVERT(NUMERIC(17 , 0 ) , "M_LV")) / 0.60 </SQL> </MeasureExpression> </Measure> <!-- <Measure name="absent" aggregator="sum" formatString="###,###,###.##" caption="ชม. ขาด (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "ABSENT") + ("ABSENT" - CONVERT(NUMERIC(17 , 0 ) , "ABSENT")) / 0.60 </SQL> </MeasureExpression> </Measure> --> <!-- <Measure name="ot" aggregator="sum" formatString="###,###,###.##" caption="ชม. OT (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "OT") + ("OT" - CONVERT(NUMERIC(17 , 0 ) , "OT")) / 0.60 </SQL> </MeasureExpression> </Measure> --> <Measure name="ot1" aggregator="sum" formatString="###,###,###.##" caption="ชม. OT1 (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "OT1") + ("OT1" - CONVERT(NUMERIC(17 , 0 ) , "OT1")) / 0.60 </SQL> </MeasureExpression> </Measure> <Measure name="ot15" aggregator="sum" formatString="###,###,###.##" caption="ชม. OT1.5 (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "OT5") + ("OT5" - CONVERT(NUMERIC(17 , 0 ) , "OT5")) / 0.60 </SQL> </MeasureExpression> </Measure> <Measure name="ot2" aggregator="sum" formatString="###,###,###.##" caption="ชม. OT2 (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "OT2") + ("OT2" - CONVERT(NUMERIC(17 , 0 ) , "OT2")) / 0.60 </SQL> </MeasureExpression> </Measure> <Measure name="ot3" aggregator="sum" formatString="###,###,###.##" caption="ชม. OT3 (ฐานร้อย)"> <MeasureExpression> <SQL dialect="mssql"> CONVERT(NUMERIC(17 , 0 ) , "OT3") + ("OT3" - CONVERT(NUMERIC(17 , 0 ) , "OT3")) / 0.60 </SQL> </MeasureExpression> </Measure> <Measure name="source_in" aggregator="sum" formatString="###,###,###.##" caption="ไม่รูดเข้า (ครั้ง)"> <MeasureExpression> <SQL dialect="mssql"> (case when "SOURCE_IN" != '1' then 1 else 0 end) </SQL> </MeasureExpression> </Measure> </Cube> <!-- * * * * * * * * * * * * * * * * * * * จบข้อมูลการทำงาน * * * * * * * * * * * * * * * * * * * --> <!-- ******************************************************************Payroll****************************************************************************** --> <Cube name="payroll"> <Table name="PAYROLL"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="time_payroll" source="time_payroll" foreignKey="STARTDATE"/> <Measure name="salary" column="SALARY" caption="เงินเดือน" aggregator="sum" formatString="Standard"/> <Measure name="reward" column="REWARD" caption="รางวัล" aggregator="sum" formatString="Standard"/> <Measure name="allawance" column="ALLAWANCE" caption="เบี้ยเลี้ยง" aggregator="sum" formatString="Standard"/> <Measure name="bonus" column="BONUS" caption="โบนัส" aggregator="sum" formatString="Standard"/> <Measure name="perpetuity" column="PERPETUITY" caption="บำเน็จ" aggregator="sum" formatString="Standard"/> <Measure name="pension" column="PENSION" caption="บำนาญ" aggregator="sum" formatString="Standard"/> <Measure name="overtime" column="OVERTIME" caption="ค่าล่วงเวลา" aggregator="sum" formatString="Standard"/> <Measure name="commission" column="COMMISSION" caption="ค่านายหน้า" aggregator="sum" formatString="Standard"/> <Measure name="meeting_allawance" column="MEETING_ALLAWANCE" caption="ค่าเบี้ยประชุม" aggregator="sum" formatString="Standard"/> <Measure name="gasoline" column="GASOLINE" caption="ค่าน้ำมัน" aggregator="sum" formatString="Standard"/> <Measure name="housing_allw" column="HOUSING_ALLW" caption="ค่าเดินทาง" aggregator="sum" formatString="Standard"/> <Measure name="defined_benefit" column="DEFINED_BENEFIT" caption="เงินชดเชย(กบข.)" aggregator="sum" formatString="Standard"/> <Measure name="labor_force_pay" column="LOBOR_FORCE_PAY" caption="เงินชดเชยกฏหมายแรงงาน" aggregator="sum" formatString="Standard"/> <Measure name="severance_pay" column="SEVERANCE_PAY" caption="เงินชดเชยนายจ้างจ่ายให้ครั้งเดียว" aggregator="sum" formatString="Standard"/> <Measure name="salary_behind" column="SALARY_BEHIND" caption="ตกเบิกเงินเดือน" aggregator="sum" formatString="Standard"/> <Measure name="overtime_behind" column="OVERTIME_BEHIND" caption="ตกเบิกค่าล่วงเวลา " aggregator="sum" formatString="Standard"/> <Measure name="treat" column="TREAT" caption="ค่ารักษาพยาบาล" aggregator="sum" formatString="Standard"/> <Measure name="child_upkeep" column="CHILD_UPKEEP" caption="ค่าเล่าเรียนบุตร " aggregator="sum" formatString="Standard"/> <Measure name="other_income" column="OTHER_INCOME" caption="เงินได้อื่น ๆ" aggregator="sum" formatString="Standard"/> <Measure name="salary_expense" column="SALARY_EXPENSE" caption="หักเงินเดือน" aggregator="sum" formatString="Standard"/> <Measure name="compensation_expensw" column="COMPENSATION_EXPENSE" caption="หักสหกรณ์ " aggregator="sum" formatString="Standard"/> <Measure name="other_expense" column="OTHER_EXPENSE" caption="หักอื่น ๆ " aggregator="sum" formatString="Standard"/> <Measure name="social_security" column="SOCIAL_SECURITY" caption="ค่าประกันสังคม" aggregator="sum" formatString="Standard"/> <Measure name="income_tax" column="INCOME_TAX" caption="ภาษีเงินได้" aggregator="sum" formatString="Standard"/> <Measure name="provident_fund" column="PROVIDENT_FUND" caption="กองทุนสำรองเลี้ยงชีพ" aggregator="sum" formatString="Standard"/> </Cube> <Cube name="leave"> <Table name="MEMPL_LEAVE_TOTAL"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <DimensionUsage name="day_type" source="day_type" foreignKey="DAY_TYPE"/> <Measure name="day_count" column="DAY_COUNT" caption="นับวันลา" aggregator="sum" formatString="Standard"/> </Cube> <Cube name="Train"> <Table name="TRAIN"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <DimensionUsage name="position" source="position" foreignKey="EMPLOYEEID"/> <DimensionUsage name="detail" source="detail" foreignKey="TRAINID"/> <DimensionUsage name="CRSEDESC" source="CRSEDESC" foreignKey="TRAINID"/> <DimensionUsage name="start_date" source="start_date" foreignKey="TRAINID"/> <DimensionUsage name="end_date" source="end_date" foreignKey="TRAINID"/> <DimensionUsage name="locdesc" source="locdesc" foreignKey="TRAINID"/> <DimensionUsage name="troom_no" source="troom_no" foreignKey="TRAINID"/> <DimensionUsage name="instdesc" source="instdesc" foreignKey="TRAINID"/> <DimensionUsage name="time3" source="time3" foreignKey="START_DATE"/> <DimensionUsage name="group" source="group" foreignKey="EMP_GROUP"/> <Measure name="costregis" column="COSTREGIS" caption="ค่าลงทะเบียน" aggregator="count" formatString="Standard"/> <Measure name="costtrain" column="COSTTRAIN" caption="ค่าอบรม" aggregator="sum" formatString="Standard"/> <Measure name="costroom" column="COSTROOM" caption="ค่าห้อง" aggregator="sum" formatString="Standard"/> <Measure name="costfood" column="COSTFOOD" caption="ค่าอาหาร" aggregator="sum" formatString="Standard"/> <Measure name="coffeebreak" column="COFFEEBREAK" caption="ค่ากาแฟ/อาหารว่าง" aggregator="sum" formatString="Standard"/> <Measure name="costtrainer" column="COSTTRAINER" caption="ค่าวิทยากร" aggregator="sum" formatString="Standard"/> <Measure name="costdoc" column="COSTDOC" caption="ค่าเอกสาร" aggregator="sum" formatString="Standard"/> <Measure name="costother" column="COSTOTHER" caption="ค่าใช้จ่ายอื่นๆ" aggregator="sum" formatString="Standard"/> <CalculatedMember name="total" dimension="Measures" formula="[Measures].costregis +[Measures].costtrain +[Measures].costroom +[Measures].coffeebreak +[Measures].costtrainer +[Measures].costdoc +[Measures].costother" visible="true" caption="รวมค่าใช้จ่าย"> <CalculatedMemberProperty name="FORMAT_STRING" value="####,###,##0.00"/> </CalculatedMember> </Cube> <Cube name="leave"> <Table name="MEMPL_LEAVE_TOTAL"/> <DimensionUsage name="company" source="company" foreignKey="COMPANYID"/> <DimensionUsage name="gender" source="gender" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu1_e" source="bu1_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="bu2_e" source="bu2_e" foreignKey="EMPLOYEEID"/> <DimensionUsage name="employee" source="employee" foreignKey="EMPLOYEEID"/> <DimensionUsage name="day_type" source="day_type" foreignKey="DAY_TYPE"/> <Measure name="day_count" column="DAY_COUNT" caption="นับวันลา" aggregator="sum" formatString="Standard"/> <CalculatedMember name="day_count_all" dimension="Measures" formula="([company].[all company] , [gender].[all gender] , [bu1_e].[all bu1] , [bu2_e].[all bu2] , [employee].[all employee] , [day_type].[all day_type])" visible="false"> <CalculatedMemberProperty name="FORMAT_STRING" value="Standard"/> </CalculatedMember> <CalculatedMember name="day_countPercentage" dimension="Measures" formula="([Measures].day_count * 100.00 / [Measures].day_count_all)" visible="true" caption="%"> <CalculatedMemberProperty name="FORMAT_STRING" value="##0.00"/> </CalculatedMember> </Cube> <!-- <UserDefinedFunction name="PlusOneUdf" class="com.acme.PlusOneUdf"> --> <!-- <Role name="XXX"> <SchemaGrant access="none"> <CubeGrant cube="Employee" access="all"> <HierarchyGrant hierarchy="[blood_]" access="none"/> <HierarchyGrant hierarchy="[emp_type_]" access="none"/> </CubeGrant> </SchemaGrant> </Role> --> <!-- mondrian.rolap.RolapSchema.clearCache(); ........................................................................................ import mondrian.rolap.cache.CachePool; CachePool.instance().flush() ........................................................................................ 1. You could try to set the system propertymondrian.rolap.CachePool.costLimit=100000 or higher but (AFAIK) this will not ensure, that Mondrian will *never* access the DB. 2. call mondrian.rolap.CachePool.instance().flush() after you loaded new data --> </Schema>