initial
This commit is contained in:
2170
External All Channel.SemanticModel/definition/tables/00_KPI.tmdl
Normal file
2170
External All Channel.SemanticModel/definition/tables/00_KPI.tmdl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,45 @@
|
||||
table 0_Measure_CalGroup
|
||||
lineageTag: c4a5ce61-56b8-48b3-9c58-2bdd2bcbb70e
|
||||
|
||||
calculationGroup
|
||||
precedence: 11
|
||||
|
||||
calculationItem _allmkt =
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS ( VALUES ( Fact_Sales[PACK_COD] ) ),
|
||||
REMOVEFILTERS ( Dim_Market[MARKET] ),
|
||||
REMOVEFILTERS ( Dim_MarketTA ),
|
||||
Fact_Sales[MARKET] = "all market"
|
||||
)
|
||||
|
||||
calculationItem _not_allmkt = CALCULATE( SELECTEDMEASURE( ), KEEPFILTERS( Fact_Sales[MARKET] <> "all market" ) )
|
||||
|
||||
calculationItem _allmkt_TA =
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS (
|
||||
CALCULATETABLE (
|
||||
VALUES ( Fact_Sales[PACK_COD] ),
|
||||
Fact_Sales[MARKET] <> "all market"
|
||||
)
|
||||
),
|
||||
REMOVEFILTERS ( Dim_Market[MARKET] ),
|
||||
REMOVEFILTERS ( Dim_MarketTA[TA] ),
|
||||
Fact_Sales[MARKET] = "all market"
|
||||
)
|
||||
|
||||
column for_measure
|
||||
dataType: string
|
||||
lineageTag: daa1dfa2-573f-47cb-9ad6-1985b05ce72e
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
isHidden
|
||||
lineageTag: 9d14e53a-9456-4f28-aa70-d17d19ae5f03
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
table 'AIA.Fields.Rows'
|
||||
lineageTag: 493fffa3-faf3-483b-a23c-c0833a4cd88f
|
||||
|
||||
measure 'External.Filter.THC.Province' = CALCULATE(INT(NOT(ISEMPTY(Fact_Sales_THC))),ALL(Dim_Calendar))
|
||||
lineageTag: 47338742-664d-4c6c-86e7-5455854b1fe6
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
measure 'Config.RatioQuery.Text' =
|
||||
|
||||
IF(SELECTEDVALUE(Config_ReportURL[ReportName]) = "MA",
|
||||
"点击市场折算系数查询",
|
||||
"点击PDOT系数查询")
|
||||
/*
|
||||
用于市场系数查询的提示字符串
|
||||
*/
|
||||
lineageTag: 0bb4edb4-4211-437e-8881-56a47a3f1525
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
measure 'Cofing.PDOTRatioType' = "counting unit"
|
||||
lineageTag: c30660f4-9767-4a8e-be53-e84e1730e1f6
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
measure 'AIA.DataQualityLight' =
|
||||
SWITCH(SELECTEDVALUE(Fact_AIA_DataQuality[light]),
|
||||
"红灯",1,
|
||||
"绿灯",3,
|
||||
"黄灯",2)
|
||||
lineageTag: 101dcce4-4a4b-46e3-a9e6-f0f048ad74c9
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column Fields
|
||||
lineageTag: bd713b32-177d-4ca2-8bcd-aa425518062f
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields.Rows Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields.Rows Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields.Rows Fields'
|
||||
isHidden
|
||||
lineageTag: 69f45bd9-eb1c-4aa2-a930-e7227fda68de
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields.Rows Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields.Rows Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 7da4e131-41ee-49bb-9174-38e0d6bef98e
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Category
|
||||
lineageTag: 5092e16a-5968-4ff2-8087-81bd70e60e74
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value4]
|
||||
sortByColumn: 'Category Order'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'Category Order'
|
||||
formatString: 0
|
||||
lineageTag: ad979d4c-23f2-4913-80a1-cb27b9ddb603
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value5]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'Sub Category'
|
||||
lineageTag: 29507a30-6399-4709-a501-3c2e2a3ba200
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value6]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'Sub Category Order'
|
||||
formatString: 0
|
||||
lineageTag: eb0c8843-58fb-4a40-94f4-5f79a5399088
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value7]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields.Rows' = calculated
|
||||
mode: import
|
||||
source = ```
|
||||
{
|
||||
// ("Data Source", NAMEOF('Dim_DataSource'[SOURCENAME]), 0,"General", 0 ,"General", 1),
|
||||
("Value Type", NAMEOF('Dim_Unit'[DW]), 1,"General", 0 ,"General", 1),
|
||||
|
||||
("Period", NAMEOF(MQY[Period]), 2, "Period", 1 , "Period", 1),
|
||||
("YEAR", NAMEOF(Dim_Calendar[YEAR]), 3, "Period", 1 , "Period", 1),
|
||||
("YYYYHH", NAMEOF(Dim_Calendar[HALF_YEAR]), 4, "Period", 1 , "Period", 1),
|
||||
("YYYYQQ", NAMEOF(Dim_Calendar[YEAR_QUATER]), 5, "Period", 1 , "Period", 1),
|
||||
("YYYYMM", NAMEOF(Dim_Calendar[YYYYMM]), 6, "Period", 1 , "Period", 1),
|
||||
|
||||
("Market", NAMEOF('Dim_Market'[Market]), 10, "Market & Product", 2, "Market", 2),
|
||||
("Class", NAMEOF(Dim_Class[Class]), 11, "Market & Product", 2, "Market", 2),
|
||||
("Molecule CN", NAMEOF(Dim_PackInfo[CMPS_DES_C]), 13, "Market & Product", 2, "Product", 3),
|
||||
("Molecule EN", NAMEOF(Dim_PackInfo[CMPS_DES]), 14, "Market & Product", 2, "Product", 3),
|
||||
("Brand Package Corp", NAMEOF(Dim_PackInfo[PROD_PACK_CORP]), 16, "Market & Product", 2, "Product", 3),
|
||||
("Molecule EN & CN", NAMEOF(Dim_PackInfo[MOLECULE_CODE_DESC]), 17, "Market & Product", 2, "Product", 3),
|
||||
("Corp EN", NAMEOF('Dim_PackInfo'[CORP_DES]), 19, "Market & Product", 2 , "Corp", 1),
|
||||
("Corp CN", NAMEOF('Dim_PackInfo'[CORP_DES_C]), 20, "Market & Product", 2 , "Corp", 1),
|
||||
("Corp Type", NAMEOF(Dim_PackInfo[CORP_TYPE]), 21, "Market & Product", 2 , "Corp", 1),
|
||||
("Manufacturer", NAMEOF(Dim_PackInfo[MANU_DES]), 22, "Market & Product", 2 , "Corp", 1),
|
||||
|
||||
// ("TA", NAMEOF('Dim_MarketTA'[TA]), 23, "Market & Product", 2 , "Market", 2),
|
||||
("Brand CN", NAMEOF('Dim_PackInfo'[PROD_DES_C]), 30, "Market & Product", 2, "Product", 3),
|
||||
("Brand EN", NAMEOF('Dim_PackInfo'[PROD_DES]), 31, "Market & Product", 2, "Product", 3),
|
||||
("Key Brand", NAMEOF(Dim_KeyCompetitor[KEY_COMPETITOR]), 32, "Market & Product", 2, "Key Brand", 5),
|
||||
("Package EN", NAMEOF(Dim_PackInfo[PACK_DES]), 33, "Market & Product", 2, "Product", 3),
|
||||
("Package Code", NAMEOF(Dim_PackInfo[PACK_COD]), 34, "Market & Product", 2, "Product", 3),
|
||||
("Pack_LCH", NAMEOF(Dim_PackInfo[PACK_LCH]), 35, "Market & Product", 2, "Product", 3),
|
||||
("Originator/Generics", NAMEOF(Dim_PackInfo[GENE_ORIG_DESC]), 36, "Market & Product", 2, "Product", 3),
|
||||
("VBP", NAMEOF(Dim_PackInfo[VBP_DESC]), 37, "Market & Product", 2, "VBP", 4),
|
||||
("VBP_BATCH", NAMEOF('Dim_PackInfo'[VBP_BATCH]), 38, "Market & Product", 2, "VBP", 4),
|
||||
("VBP_IMPLEMENTING_TIME", NAMEOF('Dim_PackInfo'[VBP_IMPLEMENTING_TIME]), 39, "Market & Product", 2, "VBP", 4),
|
||||
|
||||
|
||||
("ATC1", NAMEOF(Dim_PackInfo[ATC1_CODE_DESC]), 40, "Market & Product", 2, "ACT", 6),
|
||||
("ATC2", NAMEOF(Dim_PackInfo[ATC2_CODE_DESC]), 41, "Market & Product", 2, "ACT", 6),
|
||||
("ATC3", NAMEOF(Dim_PackInfo[ATC3_CODE_DESC]), 42, "Market & Product", 2, "ACT", 6),
|
||||
("ATC4", NAMEOF(Dim_PackInfo[ATC4_CODE_DESC]), 43, "Market & Product", 2, "ACT", 6),
|
||||
("NFC1", NAMEOF(Dim_PackInfo[APP1_COD_DES_C]), 44, "Market & Product", 2, "NFC", 7),
|
||||
("NFC2", NAMEOF(Dim_PackInfo[APP2_COD_DES_C]), 45, "Market & Product", 2, "NFC", 7),
|
||||
("NFC3", NAMEOF(Dim_PackInfo[APP3_COD_DES_C]), 46, "Market & Product", 2, "NFC", 7),
|
||||
|
||||
("Province", NAMEOF('Dim_Geo'[PROVINCE_C]), 55, "Geography", 3, "Geo", 4),
|
||||
("City", NAMEOF('Dim_Geo'[CITY_C]), 56, "Geography", 3, "Geo", 4),
|
||||
("City Tier", NAMEOF('Dim_Geo'[AZ_CITY_TIER]), 57, "Geography", 3, "Geo", 4),
|
||||
("County", NAMEOF('Dim_Geo'[COUNTY_NAME]), 58, "Geography", 3, "Geo", 4),
|
||||
("County Tier", NAMEOF('Dim_Geo'[county_tier]), 59, "Geography", 3, "Geo", 4),
|
||||
("PMT Region", NAMEOF('Dim_Geo'[pmt_region]), 60, "Geography", 3, "Geo", 4),
|
||||
|
||||
("BU Category", NAMEOF('Dim_Org'[BU_CATEGORY]), 70, "Organization", 4, "Org", 3),
|
||||
("BU", NAMEOF('Dim_Org'[BU_NAME_EN]), 71, "Organization", 4, "Org", 3),
|
||||
("Sub BU", NAMEOF('Dim_Org'[SUB_BU_NAME]), 72, "Organization", 4, "Org", 3),
|
||||
("RC", NAMEOF('Dim_Org'[rc_name_en]), 73, "Organization", 4, "Org", 3),
|
||||
("Region", NAMEOF('Dim_Org'[region_name_en]), 74, "Organization", 4, "Org", 3),
|
||||
("Team", NAMEOF('Dim_Org'[team]), 75, "Organization", 4, "Org", 3),
|
||||
("Territory Code", NAMEOF('Dim_Org'[mr_trty_code]), 76, "Organization", 4, "Org", 3),
|
||||
("RSD", NAMEOF('Dim_Org'[RC_Name]), 77, "Organization", 4, "Org", 3),
|
||||
("RSM", NAMEOF('Dim_Org'[RSM_Name]), 78, "Organization", 4, "Org", 3),
|
||||
("DSM", NAMEOF('Dim_Org'[dsm_name]), 79, "Organization", 4, "Org", 3),
|
||||
("MR", NAMEOF('Dim_Org'[mr_name]), 80, "Organization", 4, "Org", 3),
|
||||
|
||||
("Sub Channel", NAMEOF('Dim_RC'[sub_channel]), 90, "Channel", 5, "Channel", 5),
|
||||
("Dragon Flag", NAMEOF('Dim_RC'[DRAGON_FLAG]), 90, "Channel", 5, "Channel", 5),
|
||||
|
||||
("Ins Name", NAMEOF('Dim_Institution'[inst_name]), 100, "Ins", 6, "Ins", 1),
|
||||
("Ins Code", NAMEOF('Dim_Institution'[INST_CODE]), 101, "Ins", 6, "Ins", 1),
|
||||
("Ins Sub Type", NAMEOF('Dim_Institution'[inst_sub_type]), 102, "Ins", 6, "Ins", 1),
|
||||
("Ins Level", NAMEOF('Dim_Institution'[ins_level]), 103, "Ins", 6, "Ins", 1),
|
||||
("Potential Value", NAMEOF('Dim_HP_Potential_AIA'[potential_value]), 104, "Ins", 6, "Potential", 2),
|
||||
("Potential Type", NAMEOF('Dim_HP_Potential_AIA'[potential_type_name]), 105, "Ins", 6, "Potential", 2),
|
||||
("Potential Market", NAMEOF('Dim_HP_Potential_AIA'[potential_mkt_name]), 106, "Ins", 6, "Potential", 2),
|
||||
("Is Default Potential MKT", NAMEOF('Dim_HP_Potential_AIA'[IS_DEFAULT_POTENTIAL_MKT]), 107, "Ins", 6, "Potential", 2),
|
||||
("Is Default Potential Type", NAMEOF('Dim_HP_Potential_AIA'[IS_DEFAULT_POTENTIAL_TYPE]), 108, "Ins", 6, "Potential", 2),
|
||||
("Decile", NAMEOF('Dim_HP_Potential_AIA'[decile]), 109, "Ins", 6, "Decile", 3), -- 注:该字段不能修改顺序,如修改顺序,要同步更改指标External.Sales.KPI和External.Sales.LY.KPI
|
||||
("Decile Group", NAMEOF('Dim_HP_Potential_AIA'[decile_group]), 110, "Ins", 6, "Decile", 3), --注: 该字段不能修改顺序,如修改顺序,要同步更改指标External.Sales.KPI和External.Sales.LY.KPI
|
||||
("Target HP", NAMEOF(Dim_RC[IS_TARGET_HP]), 111, "Ins", 6, "flag", 4),
|
||||
("KA Ins", NAMEOF(Dim_RC[KA_FLAG]), 112, "Ins", 6, "flag", 4),
|
||||
("Target Ins Level", NAMEOF(Dim_HP_Potential_AIA[target_ins_level]), 113, "Ins", 6, "flag", 4),
|
||||
("EG Project Name", NAMEOF(Dim_IsEagle_AIASpecial[is_eagle]), 114, "Ins", 6, "flag", 4),
|
||||
("Is Default Flag ", NAMEOF('Dim_HP_Potential_AIA'[IS_DEFAULT_MKT_FLAG]), 115, "Ins", 6, "Potential", 2),
|
||||
|
||||
("STGH DESC", NAMEOF('Dim_PackInfo'[STGH_DES]), 130, "More Fields", 7, "IQVIA", 8),
|
||||
("BIO DESC", NAMEOF('Dim_PackInfo'[BIO_DESC]), 131, "More Fields", 7, "IQVIA", 8),
|
||||
("ETH OTC DESC", NAMEOF('Dim_PackInfo'[ETH_OTC_DESC]), 132, "More Fields", 7, "IQVIA", 8),
|
||||
("NRDL DESC", NAMEOF('Dim_PackInfo'[NRDL_DESC]), 133, "More Fields", 7, "IQVIA", 8),
|
||||
("NRDL EntryDate", NAMEOF('Dim_PackInfo'[NRDL_ENTRY_DATE]), 134, "More Fields", 7, "IQVIA", 8),
|
||||
("EDL DESC", NAMEOF('Dim_PackInfo'[EDL_DESC]), 135,"More Fields", 7, "IQVIA", 8),
|
||||
("TCM DESC", NAMEOF('Dim_PackInfo'[TCM_DESC]), 136, "More Fields", 7, "IQVIA", 8),
|
||||
("Manufacturer Code", NAMEOF('Dim_PackInfo'[MANU_COD]), 137, "More Fields", 7, "IQVIA", 8),
|
||||
("Manufacturer中文", NAMEOF('Dim_PackInfo'[MANU_C]), 138, "More Fields", 7, "IQVIA", 8),
|
||||
("PAED DESC", NAMEOF('Dim_PackInfo'[PAED_DESC]), 139, "More Fields", 7, "IQVIA", 8),
|
||||
("GQCE DESC", NAMEOF('Dim_PackInfo'[GQCE_DESC]), 140, "More Fields", 7, "IQVIA", 8),
|
||||
("MNFL Code", NAMEOF('Dim_PackInfo'[MNFL_COD]), 141, "More Fields", 7, "IQVIA", 8),
|
||||
// ("MNFL_DES", NAMEOF('Dim_PackInfo'[MNFL_DES]), 142, "More Fields", 7, "IQVIA", 8),
|
||||
("Molecule Code", NAMEOF('Dim_PackInfo'[CMPS_COD]), 143, "More Fields", 7, "Product", 2),
|
||||
("Corp Code", NAMEOF('Dim_PackInfo'[CORP_COD]), 144, "More Fields", 7 , "Product", 2),
|
||||
("Brand Code", NAMEOF('Dim_PackInfo'[PROD_COD]), 145, "More Fields", 7, "Product", 2),
|
||||
("Brand Corp", NAMEOF(Dim_PackInfo[PROD_CORP_C]), 146, "More Fields", 7, "Product", 2),
|
||||
("ATC1 DES", NAMEOF('Dim_PackInfo'[ATC1_DES]), 147, "More Fields", 7, "Product", 2),
|
||||
("ATC2 DES", NAMEOF('Dim_PackInfo'[ATC2_DES]), 148, "More Fields", 7, "Product", 2),
|
||||
("ATC3 DES", NAMEOF('Dim_PackInfo'[ATC3_DES]), 149, "More Fields", 7, "Product", 2),
|
||||
("ATC4 DES", NAMEOF('Dim_PackInfo'[ATC4_DES]), 150, "More Fields", 7, "Product", 2),
|
||||
("NFC1 DES", NAMEOF('Dim_PackInfo'[APP1_DES]), 151, "More Fields", 7, "Product", 2),
|
||||
("NFC2 DES", NAMEOF('Dim_PackInfo'[APP2_DES]), 152, "More Fields", 7, "Product", 2),
|
||||
("NFC3 DES", NAMEOF('Dim_PackInfo'[APP3_DES]), 153, "More Fields", 7, "Product", 2),
|
||||
|
||||
("Org Manufacturer", NAMEOF('Dim_Original_Col_AIA'[org_manu_nm]), 170, "AIA原始字段", 9, "Manufacturer", 1),
|
||||
("Org Manufacturer Product", NAMEOF('Dim_Original_Col_AIA'[org_manu_prd_nm_c]), 171, "AIA原始字段", 9, "Manufacturer", 1),
|
||||
("Org Product Code", NAMEOF('Dim_Original_Col_AIA'[org_prd_cd]), 172, "AIA原始字段", 9, "Product", 2),
|
||||
("Org Package", NAMEOF('Dim_Original_Col_AIA'[org_pk]), 173, "AIA原始字段", 9, "Product", 2),
|
||||
("Org Pack Unit", NAMEOF('Dim_Original_Col_AIA'[org_pk_unit]), 174, "AIA原始字段", 9, "Product", 2),
|
||||
("Org Product Name", NAMEOF('Dim_Original_Col_AIA'[org_prd_nm_c]), 175, "AIA原始字段", 9, "Product", 2),
|
||||
("Org Product Desc", NAMEOF('Dim_Original_Col_AIA'[org_prd_str]), 176, "AIA原始字段", 9, "Product", 2),
|
||||
("Org Path", NAMEOF('Dim_Original_Col_AIA'[org_pth]), 177, "AIA原始字段", 9, "Product", 2),
|
||||
("ACT1", NAMEOF('Dim_Original_Col_AIA'[ATC1]), 178, "AIA原始字段", 9, "ACT", 3),
|
||||
("ACT2", NAMEOF('Dim_Original_Col_AIA'[ATC2]), 179, "AIA原始字段", 9, "ACT", 3),
|
||||
("ACT3", NAMEOF('Dim_Original_Col_AIA'[ATC3]), 180, "AIA原始字段", 9, "ACT", 3),
|
||||
("ACT4", NAMEOF('Dim_Original_Col_AIA'[ATC4]), 181, "AIA原始字段", 9, "ACT", 3),
|
||||
|
||||
("HP Year", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[year]), 200, "NON-SALES INS", 11, "time", 1),
|
||||
("Hospital Code", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[az_ins_code]), 201, "NON-SALES INS", 11, "hp", 2),
|
||||
("CPA HP Code", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[cpa_ins_code]), 202, "NON-SALES INS", 11, "hp", 2),
|
||||
("Hospital Name", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[az_ins_name]), 203, "NON-SALES INS", 11, "hp", 2),
|
||||
("Jan.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[January]), 204, "NON-SALES INS", 11, "time", 1),
|
||||
("Feb.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[February]), 205, "NON-SALES INS", 11, "time", 1),
|
||||
("Mar.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[March]), 206, "NON-SALES INS", 11, "time", 1),
|
||||
("Apr.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[April]), 207, "NON-SALES INS", 11, "time", 1),
|
||||
("May", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[May]), 208, "NON-SALES INS", 11, "time", 1),
|
||||
("Jun.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[June]), 209, "NON-SALES INS", 11, "time", 1),
|
||||
("Jul.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[July]), 210, "NON-SALES INS", 11, "time", 1),
|
||||
("Aug.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[August]), 211, "NON-SALES INS", 11, "time", 1),
|
||||
("Sep.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[September]), 212, "NON-SALES INS", 11, "time", 1),
|
||||
("Oct.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[October]), 213, "NON-SALES INS", 11, "time", 1),
|
||||
("Nov.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[November]), 214, "NON-SALES INS", 11, "time", 1),
|
||||
("Dec.", NAMEOF('DM_AIA_TD_HOSPITAL_NOT_PROVIDED'[December]), 215, "NON-SALES INS", 11, "time", 1),
|
||||
|
||||
("ㅤ", NAMEOF('AIA.Measures'[Hidden Field]), 1000, "Keep this check box", 100, "Keep this check box", 100)
|
||||
|
||||
--*******AIA 不需要这几张表的字段,注释掉 By Yuni, 2024/10/10**************
|
||||
// ("Platform(EC)", NAMEOF(Dim_PlatformMID[PLATFORM_TYPE]), 41),
|
||||
// ("Store Type(EC)", NAMEOF(Dim_StoreTypeMID[STORE_TYPE]), 42),
|
||||
// ("Store Name(EC)", NAMEOF(Dim_Store[STORE_NAME]), 43),
|
||||
|
||||
// ("产品ID", NAMEOF('Dim_PackInfo_Retail'[product_id]), 44),
|
||||
// ("OTC/RX", NAMEOF('Dim_PackInfo_Retail'[prescription_nature]), 45),
|
||||
// ("中西药", NAMEOF('Dim_PackInfo_Retail'[medicine_type]), 46),
|
||||
// ("细分1", NAMEOF('Dim_PackInfo_Retail'[zk_medicine_tier1]), 47),
|
||||
// ("细分2", NAMEOF('Dim_PackInfo_Retail'[zk_medicine_tier2]), 48),
|
||||
// ("细分3", NAMEOF('Dim_PackInfo_Retail'[zk_medicine_tier3]), 49),
|
||||
// ("细分4", NAMEOF('Dim_PackInfo_Retail'[zk_medicine_tier4]), 50),
|
||||
// ("通用名", NAMEOF('Dim_PackInfo_Retail'[common_name]), 51),
|
||||
// ("剂型", NAMEOF('Dim_PackInfo_Retail'[dosage_form]), 52),
|
||||
// ("对象", NAMEOF('Dim_PackInfo_Retail'[user_type]), 53),
|
||||
// ("品名", NAMEOF('Dim_PackInfo_Retail'[category_name]), 54),
|
||||
// ("商品名", NAMEOF('Dim_PackInfo_Retail'[product_name]), 55),
|
||||
// ("品牌", NAMEOF('Dim_PackInfo_Retail'[brand_name]), 56),
|
||||
// ("厂家", NAMEOF('Dim_PackInfo_Retail'[zk_manu_des]), 57),
|
||||
// ("集团权益", NAMEOF('Dim_PackInfo_Retail'[zk_corp_des]), 58),
|
||||
// ("规格", NAMEOF('Dim_PackInfo_Retail'[zk_pack_des]), 59),
|
||||
-- **********************************************************************
|
||||
// ("Dept Name", NAMEOF(Dim_PackInfo[dept_name]), 61, "Market & Product", 2),
|
||||
// ("Key Department", NAMEOF(Dim_MKTPackMapping[CORE_DEPT]), 62, "Market & Product", 2),
|
||||
// // ("XIEHE_AREA", NAMEOF('Dim_PackInfo'[area]), 62, "Market & Product", 2),
|
||||
// ("XH Data医院级别", NAMEOF('Dim_PackInfo'[h_level]), 63, "Market & Product", 2),
|
||||
// ("XH Data报销", NAMEOF('Dim_PackInfo'[reimburse]), 65, "Market & Product", 2),
|
||||
// // ("XIEHE_报销类型", NAMEOF('Dim_PackInfo'[reimburse_type]), 66, "Market & Product", 2),
|
||||
// ("XH Data来源", NAMEOF('Dim_PackInfo'[prescription_source]), 67, "Market & Product", 2),
|
||||
// // ("XIEHE_ATC", NAMEOF('Dim_PackInfo'[atc]), 68, "Market & Product", 2),
|
||||
// // ("XIEHE_新Code", NAMEOF('Dim_PackInfo'[new_code]), 69, "Market & Product", 2),
|
||||
// ("XH Data通用名", NAMEOF('Dim_PackInfo'[common_name]), 70, "Market & Product", 2),
|
||||
// ("XH Data商品名称", NAMEOF('Dim_PackInfo'[product_name]), 71, "Market & Product", 2),
|
||||
// ("XH Data厂家", NAMEOF('Dim_PackInfo'[manu_des_xiehe]), 72, "Market & Product", 2),
|
||||
// ("XH Data规格", NAMEOF('Dim_PackInfo'[pack_des_xiehe]), 73, "Market & Product", 2),
|
||||
// ("XH Data给药途径", NAMEOF('Dim_PackInfo'[drug_delivery_route]), 74, "Market & Product", 2),
|
||||
// ("XH Data剂型", NAMEOF('Dim_PackInfo'[nfc]), 75, "Market & Product", 2),
|
||||
}
|
||||
```
|
||||
|
||||
annotation PBI_Id = ec914debcdca465284a338f9e5ea6f87
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
table 'AIA.Fields_AdvanceAnalysis'
|
||||
lineageTag: db1e9a0c-2319-4556-9192-312e37f9c1e3
|
||||
|
||||
column 'AIA.Fields_AdvanceAnalysis'
|
||||
lineageTag: de5eb78b-07ce-4157-8fbd-811881efea71
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_AdvanceAnalysis Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_AdvanceAnalysis Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_AdvanceAnalysis Fields'
|
||||
isHidden
|
||||
lineageTag: 1a775a5c-c49d-4db3-8205-46c5e990bbe4
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_AdvanceAnalysis Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_AdvanceAnalysis Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 3773723a-1bee-44da-a6ec-4f6fcdf04454
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_AdvanceAnalysis' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
// ("Rank", NAMEOF([External.Rank.KPI.Combo]), 1),
|
||||
("Sales", NAMEOF([External.Sales.KPI]), 1),
|
||||
("Sales LY", NAMEOF([External.Sales.LY.KPI]), 2),
|
||||
("MS%", NAMEOF([External.MS%.KPI]), 3),
|
||||
("ΔMS%", NAMEOF([External.△MS%.KPI]), 4),
|
||||
("GR%", NAMEOF([External.Gr%.KPI]), 5),
|
||||
// ("Market GR%", NAMEOF([External.Gr%.KPI.Market]),5),
|
||||
("QoQ GR%", NAMEOF([External.RQGR%.KPI]),6),
|
||||
("HoH GR%", NAMEOF([External.HoHGR%.KPI]),7),
|
||||
|
||||
|
||||
// ("Market Size", NAMEOF([External.Sales.KPI.Market]), 10),
|
||||
// ("Market Size LY", NAMEOF([External.Sales.LY.KPI.Market]), 11),
|
||||
|
||||
("EI", NAMEOF([External.EI.KPI]), 12),
|
||||
("Incr. Sales", NAMEOF([External.GRSales.KPI]), 13),
|
||||
("Incr. Contr%", NAMEOF([External.GRSalesContr%.KPI]), 14),
|
||||
|
||||
|
||||
("Mole. GR%", NAMEOF([External.Gr%.KPI.Mol]), 15),
|
||||
("Share% in Mole", NAMEOF([External.MS%.KPI.Mol]), 16),
|
||||
("ΔShare% in Mole", NAMEOF([External.△MS%.KPI.Mol]), 17),
|
||||
// ("Mole. Sales", NAMEOF([External.Sales.KPI.Mol]), 17),
|
||||
// ("Sales LY", NAMEOF([External.Sales.LY.KPI]),18),
|
||||
// ("ΔRank", NAMEOF([External.△MS%Rank.KPI.Combo]), 19),
|
||||
("Class GR%", NAMEOF([External.Gr%.KPI.Class]), 20),
|
||||
("Share% in Class", NAMEOF([External.MS%.KPI.Class]), 21),
|
||||
("ΔShare% in Class", NAMEOF([External.△MS%.KPI.Class]), 22)
|
||||
}
|
||||
|
||||
annotation PBI_Id = 4a6ef38a1ebc4c93979e469fd0ee5b86
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
table 'AIA.Fields_Columns'
|
||||
lineageTag: 5af64682-c52e-4339-b38e-054815c3185a
|
||||
|
||||
column 'AIA.Fields_Columns'
|
||||
lineageTag: d6f2ae4d-643f-4583-9f71-a82a8c37dfdc
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_Columns Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_Columns Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Columns Fields'
|
||||
isHidden
|
||||
lineageTag: 03064e6f-4121-42db-9147-7e2fd5742bf2
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_Columns Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Columns Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 10b0d01e-4161-4289-8ad3-4c31ba48792e
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Value4
|
||||
lineageTag: 61ee26f1-d3fb-4072-9bf3-ceecc4fc72be
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Value4]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Value5
|
||||
formatString: 0
|
||||
lineageTag: f8bd85a0-c567-422e-b7fa-17c6a8158ebc
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: [Value5]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Value6
|
||||
lineageTag: 473efe8d-635d-4d6e-97c6-2d6642a7c1f6
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Value6]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Value7
|
||||
formatString: 0
|
||||
lineageTag: 3ea11172-d33f-4a62-8e65-dbc7735b0c9b
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: [Value7]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_Columns' = calculated
|
||||
mode: import
|
||||
source = ```
|
||||
{
|
||||
("Value Type", NAMEOF('Dim_Unit'[DW]), 0, "Period", 1 , "Unit", 1),
|
||||
("Period", NAMEOF(MQY[Period]), 1, "Period", 1 , "Period", 1),
|
||||
("YEAR", NAMEOF(Dim_Calendar[YEAR]), 2, "Period", 1 , "Period", 1),
|
||||
("YYYYHH", NAMEOF(Dim_Calendar[HALF_YEAR]), 3, "Period", 1 , "Period", 1),
|
||||
("YYYYQQ", NAMEOF(Dim_Calendar[YEAR_QUATER]), 4, "Period", 1 , "Period", 1),
|
||||
("YYYYMM", NAMEOF(Dim_Calendar[YYYYMM]), 5, "Period", 1 , "Period", 1),
|
||||
|
||||
|
||||
("Class", NAMEOF(Dim_Class[CLASS]), 11, "Market & Product", 2, "Market", 2),
|
||||
("Molecule CN", NAMEOF(Dim_PackInfo[CMPS_DES_C]), 13, "Market & Product", 2, "Product", 3),
|
||||
("Corp CN", NAMEOF('Dim_Corp'[CORP_DES_C]), 20, "Market & Product", 2 , "Corp", 1),
|
||||
("Brand CN", NAMEOF('Dim_PackInfo'[PROD_DES_C]), 30, "Market & Product", 2, "Product", 3),
|
||||
|
||||
// ("Key Brand", NAMEOF(Dim_MKTPackMapping[KEY_COMPETITOR]), 32, "Market & Product", 2, "Key Brand", 5),
|
||||
// ("Package EN", NAMEOF(Dim_PackInfo[PACK_DES]), 33, "Market & Product", 2, "Product", 3),
|
||||
// ("Package Code", NAMEOF(Dim_PackInfo[PACK_COD]), 34, "Market & Product", 2, "Product", 3),
|
||||
// ("Pack_LCH", NAMEOF(Dim_PackInfo[PACK_LCH]), 35, "Market & Product", 2, "Product", 3),
|
||||
// ("VBP", NAMEOF(Dim_PackInfo[VBP_DESC]), 36, "Market & Product", 2, "VBP", 4),
|
||||
// ("VBP_BATCH", NAMEOF('Dim_PackInfo'[VBP_BATCH]), 37, "Market & Product", 2, "VBP", 4),
|
||||
// ("Originator/Generics", NAMEOF(Dim_PackInfo[GENE_ORIG_DESC]), 38, "Market & Product", 2, "Product", 3),
|
||||
|
||||
("Province", NAMEOF('Dim_Geo'[PROVINCE_C]), 55, "Geography", 3, "Geo", 4),
|
||||
("City", NAMEOF('Dim_Geo'[CITY_C]), 56, "Geography", 3, "Geo", 4),
|
||||
// ("City Tier", NAMEOF('Dim_Geo'[AZ_CITY_TIER]), 57, "Geography", 3, "Geo", 4),
|
||||
// ("County", NAMEOF('Dim_Geo'[COUNTY_NAME]), 58, "Geography", 3, "Geo", 4),
|
||||
// ("County Tier", NAMEOF('Dim_Geo'[county_tier]), 59, "Geography", 3, "Geo", 4),
|
||||
// ("PMT Region", NAMEOF('Dim_Geo'[pmt_region]), 60, "Geography", 3, "Geo", 4),
|
||||
|
||||
// ("BU Category", NAMEOF('Dim_Org'[BU_CATEGORY]), 70, "Organization", 4, "Org", 3),
|
||||
// ("BU", NAMEOF('Dim_Org'[BU_NAME_EN]), 71, "Organization", 4, "Org", 3),
|
||||
// ("Sub BU", NAMEOF('Dim_Org'[SUB_BU_NAME]), 72, "Organization", 4, "Org", 3),
|
||||
("RC", NAMEOF('Dim_Org'[RC_Name]), 73, "Organization", 4, "Org", 3),
|
||||
("Region", NAMEOF('Dim_Org'[region_name_en]), 74, "Organization", 4, "Org", 3),
|
||||
// ("Team", NAMEOF('Dim_Org'[team]), 75, "Organization", 4, "Org", 3),
|
||||
// ("Territory Code", NAMEOF('Dim_Org'[mr_trty_code]), 76, "Organization", 4, "Org", 3),
|
||||
// ("RSD Name", NAMEOF('Dim_Org'[RC_Name]), 77, "Organization", 4, "Org", 3),
|
||||
// ("RSM Name", NAMEOF('Dim_Org'[RSM_Name]), 78, "Organization", 4, "Org", 3),
|
||||
// ("DSM Name", NAMEOF('Dim_Org'[dsm_name]), 79, "Organization", 4, "Org", 3),
|
||||
// ("MR", NAMEOF('Dim_Org'[mr_name]), 80, "Organization", 4, "Org", 3),
|
||||
|
||||
("Sub Channel", NAMEOF('Dim_RC'[sub_channel]), 90, "Channel", 5, "Channel", 5),
|
||||
("Dragon Flag", NAMEOF('Dim_RC'[DRAGON_FLAG]), 91, "Channel", 5, "Channel", 5),
|
||||
|
||||
// ("Ins Name", NAMEOF('Dim_Institution'[inst_name]), 100, "Ins", 6, "Ins", 1),
|
||||
// ("Ins Sub Type", NAMEOF('Dim_Institution'[inst_sub_type]), 102, "Ins", 6, "Ins", 1),
|
||||
// ("Ins Level", NAMEOF('Dim_Institution'[ins_level]), 103, "Ins", 6, "Ins", 1),
|
||||
// ("Potential Type", NAMEOF('Dim_HP_Potential_AIA'[potential_type_name]), 105, "Ins", 6, "Potential", 2),
|
||||
// ("Potential Market", NAMEOF('Dim_HP_Potential_AIA'[potential_mkt_name]), 106, "Ins", 6, "Potential", 2),
|
||||
("Decile", NAMEOF('Dim_HP_Potential_AIA'[decile]), 109, "Ins", 6, "Decile", 3),
|
||||
("Decile Group", NAMEOF('Dim_HP_Potential_AIA'[decile_group]), 110, "Ins", 6, "Decile", 3)
|
||||
}
|
||||
```
|
||||
|
||||
annotation PBI_Id = 94e09a8c59644a4292bfb633b2094d96
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table 'AIA.Fields_Decile'
|
||||
lineageTag: e3e67de4-566f-4f95-b4ee-45b8df2e628f
|
||||
|
||||
column 'AIA.Fields_Decile'
|
||||
lineageTag: 335c7f26-ce9a-4a16-8635-eb8939a902af
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_Decile 个订单'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_Decile 个字段'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Decile 个字段'
|
||||
isHidden
|
||||
lineageTag: 39bb5e97-668a-42bc-b519-fc318bb4ed92
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_Decile 个订单'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Decile 个订单'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: c5073bc5-e059-4675-956d-19491df48d76
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_Decile' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Decile Group", NAMEOF('AIA_AdvanceAnalysis_Decile_Group'[decile_group]), 0),
|
||||
("Decile", NAMEOF('AIA_AdvanceAnalysis_Decile'[decile]), 1),
|
||||
("Dragon", NAMEOF('AIA_AdvanceAnalysis_DRAGON'[DRAGON_FLAG]),1.5),
|
||||
("Sub Channel", NAMEOF('AIA_AdvanceAnalysis_Subchannel'[sub_channel]), 2)
|
||||
}
|
||||
|
||||
annotation PBI_Id = c9a715d9663f41279394b18505827f9b
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
table 'AIA.Fields_Geo'
|
||||
lineageTag: c72e7735-cfc8-488d-aee5-5309214df047
|
||||
|
||||
column 'AIA.Fields_Geo'
|
||||
lineageTag: 46968585-6f1b-461b-aa73-aa2a75ee6015
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_Geo 个订单'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_Geo 个字段'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Geo 个字段'
|
||||
isHidden
|
||||
lineageTag: d5ff2669-9ab0-49a1-b6f1-5a8031369774
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_Geo 个订单'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Geo 个订单'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 6f4d2f4f-b364-441c-9f30-d2cc42b8a2ad
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_Geo' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Province", NAMEOF('Dim_Geo'[PROVINCE_C]), 0),
|
||||
("City", NAMEOF('Dim_Geo'[CITY_C]), 1),
|
||||
("BU", NAMEOF('Dim_Org'[BU_NAME_EN]), 1.5),
|
||||
("RC", NAMEOF('Dim_Org'[rc_name_en]), 2),
|
||||
("Region", NAMEOF('Dim_Org'[REGION_CODE_DESC]), 3),
|
||||
("RSD Name", NAMEOF('Dim_Org'[RC_Name]), 4),
|
||||
("RSM Name", NAMEOF('Dim_Org'[RSM_Name]), 5),
|
||||
("Team", NAMEOF('Dim_Org'[team]), 6),
|
||||
("DSM Name", NAMEOF('Dim_Org'[dsm_name]), 7),
|
||||
("Decile Group", NAMEOF('Dim_HP_Potential_AIA'[decile_group]), 8),
|
||||
("Decile", NAMEOF('Dim_HP_Potential_AIA'[decile]), 9),
|
||||
("Dragon Flag", NAMEOF('Dim_RC'[DRAGON_FLAG]),10),
|
||||
("Sub Channel", NAMEOF('Dim_RC'[sub_channel]), 11),
|
||||
("Hospital", NAMEOF('Dim_Institution'[inst_name]), 12)
|
||||
}
|
||||
|
||||
annotation PBI_Id = 12a4b25c77b44e698797c85ffac14e0a
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
table 'AIA.Fields_Leader'
|
||||
lineageTag: 853758b5-8066-4182-a257-d2d38d6c9486
|
||||
|
||||
column 'AIA.Fields_Leader'
|
||||
lineageTag: 5251effc-f32c-477d-b738-25b31641498b
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_Leader 个订单'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_Leader 个字段'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Leader 个字段'
|
||||
isHidden
|
||||
lineageTag: ab7aa42b-51e1-4f65-8e1b-72d59a790666
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_Leader 个订单'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Leader 个订单'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 08850ed0-ab2d-4075-826e-d8ecfd61add5
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Fields_Leader(Brand组) =
|
||||
SWITCH(
|
||||
TRUE,
|
||||
ISBLANK('AIA.Fields_Leader'[AIA.Fields_Leader]),
|
||||
"(空白)",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader] IN {"Market Leader By MS%",
|
||||
"Market Leader MS%",
|
||||
"Top Competitor By MS%",
|
||||
"Top Competitor MS%",
|
||||
"Market Leader By ΔMS%",
|
||||
"Market Leader ΔMS%",
|
||||
"Top Competitor By ΔMS%",
|
||||
"Top Competitor ΔMS%"},
|
||||
"Top Brand",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader] IN {"Top Class By MS%",
|
||||
"Top Class MS%",
|
||||
"Top Class By ΔMS%",
|
||||
"Top Class ΔMS%"},
|
||||
"Top Class",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader] IN {"Top Molecule By MS%",
|
||||
"Top Molecule MS%",
|
||||
"Top Molecule By ΔMS%",
|
||||
"Top Molecule ΔMS%"},
|
||||
"Top Molecule",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader]
|
||||
)
|
||||
lineageTag: e738aedf-9c19-4fdd-a202-d389a98a8eca
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Fields_Leader(KPI组) =
|
||||
SWITCH(
|
||||
TRUE,
|
||||
ISBLANK('AIA.Fields_Leader'[AIA.Fields_Leader]),
|
||||
"(空白)",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader] IN {
|
||||
"Market Leader By MS%",
|
||||
"Market Leader MS%",
|
||||
"Top Competitor By MS%",
|
||||
"Top Competitor MS%",
|
||||
"Top Class By MS%",
|
||||
"Top Class MS%",
|
||||
"Top Molecule By MS%",
|
||||
"Top Molecule MS%"
|
||||
},
|
||||
"by MS%",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader] IN {
|
||||
"Market Leader By ΔMS%",
|
||||
"Market Leader ΔMS%",
|
||||
"Top Competitor By ΔMS%",
|
||||
"Top Competitor ΔMS%",
|
||||
"Top Class By ΔMS%",
|
||||
"Top Class ΔMS%",
|
||||
"Top Molecule By ΔMS%",
|
||||
"Top Molecule ΔMS%"
|
||||
},
|
||||
"by ΔMS%",
|
||||
'AIA.Fields_Leader'[AIA.Fields_Leader]
|
||||
)
|
||||
lineageTag: f5ddbe54-44c7-493d-a018-c8a8d0d030d7
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_Leader' = calculated
|
||||
mode: import
|
||||
source = ```
|
||||
{
|
||||
("Market Leader By MS%", NAMEOF('Measure'[External.MS%.KPI.Top1PlayerName]), 1),
|
||||
("Market Leader MS%", NAMEOF('Measure'[External.MS%.KPI.Top1Player]), 2),
|
||||
("Market Leader By ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1PlayerName]), 3),
|
||||
("Market Leader ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1Player]), 4),
|
||||
|
||||
("Top Competitor By MS%", NAMEOF('Measure'[External.MS%.KPI.Top1CompetitorName]), 5),
|
||||
("Top Competitor MS%", NAMEOF('Measure'[External.MS%.KPI.Top1Competitor]), 6),
|
||||
("Top Competitor By ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1CompetitorName]), 7),
|
||||
("Top Competitor ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1Competitor]), 8),
|
||||
|
||||
("Top Molecule By MS%", NAMEOF('Measure'[External.MS%.KPI.Top1MolName]), 9),
|
||||
("Top Molecule MS%", NAMEOF('Measure'[External.MS%.KPI.Top1Mol]), 10),
|
||||
("Top Molecule By ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1MolName]), 11),
|
||||
("Top Molecule ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1Mol]), 12),
|
||||
|
||||
("Top Class By MS%", NAMEOF('Measure'[External.MS%.KPI.Top1ClassName]), 13),
|
||||
("Top Class MS%", NAMEOF('Measure'[External.MS%.KPI.Top1Class]), 14),
|
||||
("Top Class By ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1ClassName]), 15),
|
||||
("Top Class ΔMS%", NAMEOF('Measure'[External.△MS%.KPI.Top1Class]), 16)
|
||||
}
|
||||
```
|
||||
|
||||
annotation PBI_Id = aeeea854525646e784d2fc23304c4e59
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table 'AIA.Fields_MKT'
|
||||
lineageTag: 9701e0d6-7e94-40be-bbf5-eecd9bbb65de
|
||||
|
||||
column 'AIA.Fields_MKT'
|
||||
lineageTag: 2ffa1d49-174c-4c1a-b71d-03f0616c06e8
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_MKT 个订单'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_MKT 个字段'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_MKT 个字段'
|
||||
isHidden
|
||||
lineageTag: 24d849ba-f3af-4455-86a7-38d9e5f00efa
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_MKT 个订单'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_MKT 个订单'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 43cbca44-7cfd-4a98-8e98-1f1c6d114598
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_MKT' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Key Brand", NAMEOF('AIA_AdvanceAnalysis_Key_Competitor'[KEY_COMPETITOR_CN]), 0),
|
||||
("Brand", NAMEOF('AIA_AdvanceAnalysis_Brand'[PROD_DES_C]), 1),
|
||||
("Class", NAMEOF('AIA_AdvanceAnalysis_Class'[CLASS]), 2),
|
||||
("Molecule", NAMEOF('AIA_AdvanceAnalysis_Mole'[CMPS_DES_C]), 3)
|
||||
}
|
||||
|
||||
annotation PBI_Id = a8505794369c4721999fe8cfc929d2e3
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
table 'AIA.Fields_MarketBrand'
|
||||
lineageTag: 7c85987c-78f5-435f-8eee-3316cc29fecb
|
||||
|
||||
column 'AIA.Fields.MarketBrand'
|
||||
lineageTag: bef276eb-08a1-48ac-8e05-42251343dc36
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields.MarketBrand Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields.MarketBrand Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields.MarketBrand Fields'
|
||||
isHidden
|
||||
lineageTag: aab5bec5-47b9-4c78-a15d-7ad5dfa75c07
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields.MarketBrand Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields.MarketBrand Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: dc6a7fd8-1a73-434d-8a4f-340815fe1591
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_MarketBrand' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
// ("Rank", NAMEOF([External.Rank.KPI.Combo]), 1),
|
||||
("Sales", NAMEOF([External.Sales.KPI]), 2),
|
||||
("MS%", NAMEOF([External.MS%.KPI]), 3),
|
||||
("ΔMS%", NAMEOF([External.△MS%.KPI]), 4),
|
||||
("GR%", NAMEOF([External.Gr%.KPI]), 5),
|
||||
("EI", NAMEOF([External.EI.KPI]), 6),
|
||||
|
||||
("Market Size", NAMEOF([External.Sales.KPI.Market]), 7),
|
||||
("Market Size LY", NAMEOF([External.Sales.LY.KPI.Market]), 8),
|
||||
("Market GR%", NAMEOF([External.Gr%.KPI.Market]), 9),
|
||||
|
||||
("Incr. Sales", NAMEOF([External.GRSales.KPI]), 10),
|
||||
("Incr. Contr%", NAMEOF([External.GRSalesContr%.KPI]), 11),
|
||||
("QoQ GR%", NAMEOF([External.RQGR%.KPI]),12),
|
||||
("HoH GR%", NAMEOF([External.HoHGR%.KPI]),13),
|
||||
|
||||
("Mole. GR%", NAMEOF([External.Gr%.KPI.Mol]), 14),
|
||||
("Share% in Mole", NAMEOF([External.MS%.KPI.Mol]), 15),
|
||||
("ΔShare% in Mole", NAMEOF([External.△MS%.KPI.Mol]), 16),
|
||||
// ("Mole. Sales", NAMEOF([External.Sales.KPI.Mol]), 17),
|
||||
// ("Sales LY", NAMEOF([External.Sales.LY.KPI]),18),
|
||||
// ("ΔRank", NAMEOF([External.△MS%Rank.KPI.Combo]), 19),
|
||||
("Class. GR%", NAMEOF([External.Gr%.KPI.Class]), 20),
|
||||
("Share% in Class", NAMEOF([External.MS%.KPI.Class]), 21),
|
||||
("ΔShare% in Class", NAMEOF([External.△MS%.KPI.Class]), 22)
|
||||
}
|
||||
|
||||
annotation PBI_Id = 50ed5c5b5bf744a194067575ea51a5e0
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
table 'AIA.Fields_Measures_All'
|
||||
lineageTag: 63039b35-24f4-4aa6-8df3-07065788e0a4
|
||||
|
||||
column 'AIA.Fields_Measures_All'
|
||||
lineageTag: 537fe04a-e764-49fd-b3ed-b2f5abc82240
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_Measures_All Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_Measures_All Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Measures_All Fields'
|
||||
isHidden
|
||||
lineageTag: 99f86bea-1d71-4c15-91cb-8cbd56399438
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_Measures_All Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_Measures_All Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 616c974b-82ea-4af9-8587-9d8b07210edd
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Category
|
||||
lineageTag: c37f6d4f-51fd-4f4a-be70-7196a68db8cf
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value4]
|
||||
sortByColumn: 'Category Order'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'Category Order'
|
||||
formatString: 0
|
||||
lineageTag: 2402da93-850d-4db7-96e1-597977c0c207
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value5]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_Measures_All' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Market Size", NAMEOF([External.Sales.KPI.Market]), 1, "Sales", 1),
|
||||
("Market Size LY", NAMEOF([External.Sales.LY.KPI.Market]), 1, "Sales", 1),
|
||||
("Sales", NAMEOF([External.Sales.KPI]), 3, "Sales", 1),
|
||||
("Sales LY", NAMEOF([External.Sales.LY.KPI]),4, "Sales", 1),
|
||||
("Market GR%", NAMEOF([External.Gr%.KPI.Market]), 5, "Growth", 3),
|
||||
("GR%", NAMEOF([External.Gr%.KPI]), 6, "Growth", 3),
|
||||
("QoQ GR%", NAMEOF([External.RQGR%.KPI]),7,"Growth", 3),
|
||||
("HoH GR%", NAMEOF([External.HoHGR%.KPI]),8,"Growth", 3),
|
||||
// ("R3M GR%", NAMEOF(),7), --pending
|
||||
// ("RM GR%", NAMEOF(),8), --pending
|
||||
("MS%", NAMEOF([External.MS%.KPI]), 9, "Share", 2),
|
||||
("ΔMS%", NAMEOF([External.△MS%.KPI]), 10, "Share", 2),
|
||||
("EI", NAMEOF([External.EI.KPI]), 11, "Growth", 3),
|
||||
|
||||
("Mole. Sales", NAMEOF([External.Sales.KPI.Mol]), 14, "Sales", 1),
|
||||
("Mole. Sales LY", NAMEOF([External.Sales.LY.KPI.Mol]), 15, "Sales", 1),
|
||||
("Mole. GR%", NAMEOF([External.Gr%.KPI.Mol]), 16,"Growth", 3),
|
||||
("Share% in Mole.", NAMEOF([External.MS%.KPI.Mol]), 17, "Share", 2),
|
||||
("ΔShare% in Mole.", NAMEOF([External.△MS%.KPI.Mol]), 18, "Share", 2),
|
||||
// ("Rank", NAMEOF([External.Rank.KPI.Combo]), 19),
|
||||
// ("ΔRank", NAMEOF([External.△MS%Rank.KPI.Combo]), 20),
|
||||
("Class Sales", NAMEOF([External.Sales.KPI.Class]), 23, "Sales", 1),
|
||||
("Class Sales LY", NAMEOF([External.Sales.LY.KPI.Class]), 24, "Sales", 1),
|
||||
("Class GR%", NAMEOF([External.Gr%.KPI.Class]), 25,"Growth", 3),
|
||||
("Share% in Class", NAMEOF([External.MS%.KPI.Class]), 26, "Share", 2),
|
||||
("ΔShare% in Class", NAMEOF([External.△MS%.KPI.Class]), 27, "Share", 2),
|
||||
("Sales Contr%", NAMEOF([External.SalesContr%.KPI]), 28, "Sales", 1),
|
||||
("Incr. Sales", NAMEOF([External.GRSales.KPI]), 29, "Sales", 1),
|
||||
("Incr. Contr%", NAMEOF([External.GRSalesContr%.KPI]), 30, "Sales", 1),
|
||||
// ("Ins#", NAMEOF([Inst#]), 31, "Institution", 5),
|
||||
("Price/Unit(RMB)", NAMEOF([External.PriceUnit.KPI]), 32, "Price", 6),
|
||||
("Price/CU(RMB)", NAMEOF([External.PriceCU.KPI]), 33, "Price", 6),
|
||||
|
||||
("Top1 Brand", NAMEOF([External.MS%.KPI.Top1PlayerName.AIA]), 40, "TOP Brand", 7),
|
||||
("Top1 Brand Sales", NAMEOF([External.Sales.KPI.Top1Player.AIA]), 41, "TOP Brand", 7),
|
||||
("Top1 Brand GR%", NAMEOF([External.GR%.KPI.Top1Player.AIA]), 42, "TOP Brand", 7),
|
||||
("Top1 Brand MS%", NAMEOF([External.MS%.KPI.Top1Player.AIA]), 43, "TOP Brand", 7),
|
||||
("Top1 Brand ΔMS%", NAMEOF([External.△MS%.KPI.Top1Player.AIA]), 44, "TOP Brand", 7),
|
||||
("Top2 Brand", NAMEOF([External.MS%.KPI.Top2PlayerName.AIA]), 45, "TOP Brand", 7),
|
||||
("Top2 Brand Sales", NAMEOF([External.Sales.KPI.Top2Player.AIA]), 46, "TOP Brand", 7),
|
||||
("Top2 Brand GR%", NAMEOF([External.GR%.KPI.Top2Player.AIA]), 47, "TOP Brand", 7),
|
||||
("Top2 Brand MS%", NAMEOF([External.MS%.KPI.Top2Player.AIA]), 48, "TOP Brand", 7),
|
||||
("Top2 Brand ΔMS%", NAMEOF([External.△MS%.KPI.Top2Player.AIA]), 49, "TOP Brand", 7),
|
||||
("Top3 Brand", NAMEOF([External.MS%.KPI.Top3PlayerName.AIA]), 50, "TOP Brand", 7),
|
||||
("Top3 Brand Sales", NAMEOF([External.Sales.KPI.Top3Player.AIA]), 51, "TOP Brand", 7),
|
||||
("Top3 Brand GR%", NAMEOF([External.GR%.KPI.Top3Player.AIA]), 52, "TOP Brand", 7),
|
||||
("Top3 Brand MS%", NAMEOF([External.MS%.KPI.Top3Player.AIA]), 53, "TOP Brand", 7),
|
||||
("Top3 Brand ΔMS%", NAMEOF([External.△MS%.KPI.Top3Player.AIA]), 54, "TOP Brand", 7),
|
||||
|
||||
("Default Potential Market", NAMEOF([4.3 PotentialMarket_Default]), 80, "Potential", 10),
|
||||
("Default Potential Type", NAMEOF([4.3 PotentialType_Default]), 81, "Potential", 10),
|
||||
("Default Potential Value", NAMEOF([4.3 PotentialValue_Default]), 82, "Potential", 10),
|
||||
("Potential Market", NAMEOF([4.3 PotentialMarket]), 83, "Potential", 10),
|
||||
("Potential Type", NAMEOF([4.3 PotentialType]), 84, "Potential", 10),
|
||||
("Potential Value", NAMEOF([4.3 PotentialValue]), 85, "Potential", 10),
|
||||
|
||||
("ㅤ", NAMEOF([Hidden Measure]), 1000, "Keep this check box", 100)
|
||||
}
|
||||
|
||||
annotation PBI_Id = e07f6698bc3942ee9968d7b8bc3a8601
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
table 'AIA.Fields_MergeData'
|
||||
lineageTag: 56244ab6-b7b1-4f14-a919-0fe1beeda740
|
||||
|
||||
measure AIA_Merge_Data_Text = IF( NOT ( ISFILTERED( Dim_Market[MARKET] ) || ISFILTERED(Dim_BrandDefaultMKT[MARKET])), "请先选择市场")
|
||||
lineageTag: a72f848e-ab36-47d1-a6d8-da9fd8210afa
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
measure AIA_Merge_Data_Date = SELECTEDVALUE( 'Table'[value])
|
||||
lineageTag: 24d86ed8-e5e7-4d82-9d66-60efeb685354
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column 'AIA.Fields_MergeData'
|
||||
lineageTag: 7dd63168-0136-4e87-bd12-dac9b061d8a5
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Fields_MergeData Order'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Fields_MergeData Fields'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_MergeData Fields'
|
||||
isHidden
|
||||
lineageTag: 3fbd3be7-a641-41bd-8848-f2534f3a0d65
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Fields_MergeData Order'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Fields_MergeData Order'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: aa4cd5e5-e442-4163-9853-498a30bfb99d
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Fields_MergeData' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Province", NAMEOF('Dim_Geo'[PROVINCE_C]), 0),
|
||||
("City", NAMEOF('Dim_Geo'[CITY_C]), 1),
|
||||
("BU", NAMEOF('Dim_Org'[BU_NAME_EN]), 1.5),
|
||||
("RC", NAMEOF('Dim_Org'[rc_name_en]), 2),
|
||||
("Region", NAMEOF('Dim_Org'[REGION_CODE_DESC]), 3),
|
||||
("RSD Name", NAMEOF('Dim_Org'[RC_Name]), 4),
|
||||
("RSM Name", NAMEOF('Dim_Org'[RSM_Name]), 5),
|
||||
("Team", NAMEOF('Dim_Org'[team]), 6),
|
||||
("DSM Name", NAMEOF('Dim_Org'[dsm_name]), 7)
|
||||
}
|
||||
|
||||
annotation PBI_Id = 3bbea33c98b748ad8f1c7f31298dd60c
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,63 @@
|
||||
table 'AIA.Measures_MarketAdvanced'
|
||||
lineageTag: 6332221f-5b79-464c-86ef-4b582718a677
|
||||
|
||||
column 'AIA.Measures_MarketAdvanced'
|
||||
lineageTag: 5c90ca17-9bb9-4f94-9470-94bf82c7cf0d
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: 'AIA.Measures_MarketAdvanced 个订单'
|
||||
|
||||
relatedColumnDetails
|
||||
groupByColumn: 'AIA.Measures_MarketAdvanced 个字段'
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Measures_MarketAdvanced 个字段'
|
||||
isHidden
|
||||
lineageTag: d1a609aa-80cf-401c-a470-ff206b25eaf7
|
||||
summarizeBy: none
|
||||
sourceColumn: [Value2]
|
||||
sortByColumn: 'AIA.Measures_MarketAdvanced 个订单'
|
||||
|
||||
extendedProperty ParameterMetadata =
|
||||
{
|
||||
"version": 3,
|
||||
"kind": 2
|
||||
}
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 'AIA.Measures_MarketAdvanced 个订单'
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 2c74db69-9ac4-4cd8-ac64-f75238848739
|
||||
summarizeBy: sum
|
||||
sourceColumn: [Value3]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Measures_MarketAdvanced' = calculated
|
||||
mode: import
|
||||
source =
|
||||
{
|
||||
("Sales", NAMEOF([External.Sales.KPI]), 0),
|
||||
("GR%", NAMEOF([External.Gr%.KPI]), 1),
|
||||
("MS%", NAMEOF([External.MS%.KPI]), 2),
|
||||
("ΔMS%", NAMEOF([External.△MS%.KPI.AIA]), 3),
|
||||
("EI", NAMEOF([External.EI.KPI]), 4),
|
||||
("QoQ GR%", NAMEOF([External.RQGR%.KPI]), 5),
|
||||
("HoH GR%", NAMEOF([External.HoHGR%.KPI]), 6),
|
||||
("Share% in Mole", NAMEOF('Measure'[External.MS%.KPI.Mol]), 7),
|
||||
("ΔShare% in Mole", NAMEOF([External.△MS%.KPI.Mol.AIA]), 8),
|
||||
("Mole. GR%", NAMEOF([External.Gr%.KPI.Mol]), 9),
|
||||
("Rank", NAMEOF([External.Rank.KPI.Combo]), 10),
|
||||
("Incr. Contr%", NAMEOF([External.GRSalesContr%.KPI]), 11),
|
||||
("Share% in Class", NAMEOF([External.MS%.KPI.Class]), 12),
|
||||
("ΔShare% in Class", NAMEOF([External.△MS%.KPI.Class.AIA]), 13),
|
||||
("Class GR%", NAMEOF([External.Gr%.KPI.Class]), 14)
|
||||
}
|
||||
|
||||
annotation PBI_Id = 3c1ace35e3104f81880f6c566e56e7cd
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
table 'AIA.Option_Brand'
|
||||
lineageTag: 1740cf7f-c0a7-4f2e-8de6-1e520ebc1a80
|
||||
|
||||
column Value
|
||||
lineageTag: 7f76b84a-be0e-4680-91f7-495b9f008633
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Value]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Option_Brand' = calculated
|
||||
mode: import
|
||||
source = {"brand","corp","class","moleclue","package"}
|
||||
|
||||
annotation PBI_Id = fd92c8bf5f8a45f38632eac9da33d7e8
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
table 'AIA.Option_Geo'
|
||||
lineageTag: cb8fa434-2ccd-4a62-98a2-789928b5abcc
|
||||
|
||||
column Geo
|
||||
lineageTag: 52fad953-3b04-43b3-8efa-a89e87db7cf6
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Geo]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Order
|
||||
formatString: 0
|
||||
lineageTag: cd4047c6-d95e-4ddd-8a57-7fb1a7e580b3
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: [Order]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Option_Geo' = calculated
|
||||
mode: import
|
||||
source =
|
||||
SELECTCOLUMNS(
|
||||
{("Province", 1),("City", 2),("RC", 3),("Region", 4), ("DSM", 5),("Decile", 6),("subchannel", 7),("Hospital", 8)},
|
||||
"Geo", [Value1],"Order", [Value2]
|
||||
)
|
||||
|
||||
annotation PBI_Id = 4c06533219dc46dc886b776ce680fd8c
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
table 'AIA.Option_Ins'
|
||||
lineageTag: 795e681e-1134-408c-af8b-4b18c402f07c
|
||||
|
||||
column Ins
|
||||
lineageTag: 0e20830d-4dfa-4585-9a4d-ef767f25ce4c
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Ins]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Order
|
||||
formatString: 0
|
||||
lineageTag: c4ff0123-b71f-4f92-ab43-4dc3b3afa8da
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: [Order]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition 'AIA.Option_Ins' = calculated
|
||||
mode: import
|
||||
source =
|
||||
SELECTCOLUMNS(
|
||||
{("全部机构", 1),("两年共有", 2),("连续取数", 3)},
|
||||
"Ins", [Value1],"Order", [Value2]
|
||||
)
|
||||
|
||||
annotation PBI_Id = 7589cb6669b3495f89f712f3c2dcd28c
|
||||
|
||||
annotation TabularEditor_TableGroup = 01_ParameterField
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
table AIA_AA_Calgroup
|
||||
lineageTag: 1e8e57b3-29dc-434e-8325-6911fcb3f7b9
|
||||
|
||||
calculationGroup
|
||||
precedence: 5
|
||||
|
||||
calculationItem AIA_Switch_Packinfo = ```
|
||||
SWITCH(TRUE(),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Brand[PROD_DES_C]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Brand[PROD_DES_C]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Brand)),
|
||||
"AZ Total",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Brand),KEEPFILTERS(Dim_Corp[CORP_DES] = "ASTRAZENECA")),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Key_Competitor[KEY_COMPETITOR_CN]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Key_Competitor[KEY_COMPETITOR_CN]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Key_Competitor)),
|
||||
"AZ Total",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Key_Competitor),KEEPFILTERS(Dim_Corp[CORP_DES] = "ASTRAZENECA")),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Class[CLASS]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Class[CLASS]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Class)),
|
||||
"AZ Total",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Class),KEEPFILTERS(Dim_Corp[CORP_DES] = "ASTRAZENECA")),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Mole[CMPS_DES_C]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Mole[CMPS_DES_C]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Mole)),
|
||||
"AZ Total",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Mole),KEEPFILTERS(Dim_Corp[CORP_DES] = "ASTRAZENECA")),
|
||||
SELECTEDMEASURE())
|
||||
)
|
||||
```
|
||||
|
||||
calculationItem AIA_Switch_Orginfo = ```
|
||||
SWITCH(TRUE(),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Subchannel[SUB_CHANNEL]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Subchannel[SUB_CHANNEL]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Subchannel)),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Decile[DECILE]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Decile[DECILE]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Decile)),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_Decile_Group[DECILE_GROUP]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_Decile_Group[DECILE_GROUP]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_Decile_Group)),
|
||||
SELECTEDMEASURE()),
|
||||
ISINSCOPE(AIA_AdvanceAnalysis_DRAGON[DRAGON_FLAG]),
|
||||
SWITCH(SELECTEDVALUE(AIA_AdvanceAnalysis_DRAGON[DRAGON_FLAG]),
|
||||
"market",CALCULATE(SELECTEDMEASURE(),ALLSELECTED(AIA_AdvanceAnalysis_DRAGON)),
|
||||
SELECTEDMEASURE())
|
||||
)
|
||||
```
|
||||
|
||||
column AIA
|
||||
dataType: string
|
||||
lineageTag: b0300fa6-0530-4adb-92c2-581b74890e7f
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 45b6d3a9-4c90-4c87-94df-785f723425ff
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
table AIA_AdvanceAnalysis_Brand
|
||||
lineageTag: 293d2823-78a7-4dad-8e6b-05a953e40407
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: d702c84c-9897-4490-8744-5e27779b3335
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
sortByColumn: RANK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RANK
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: a04c7363-e90c-4410-9e81-1a7bff3ec089
|
||||
summarizeBy: none
|
||||
sourceColumn: RANK
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Brand = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select PROD_DES_C,RANK from dm.dm_td_aia_brand_rank
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Filtered Rows" = Table.SelectRows(Source, each [PROD_DES_C] <> null and [PROD_DES_C] <> "")
|
||||
in
|
||||
#"Filtered Rows"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
table AIA_AdvanceAnalysis_Class
|
||||
lineageTag: 96f2b1bb-b518-43bd-9ce9-d624f66445ef
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: b791d2e3-9a62-4dac-95d0-239820e8586b
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
sortByColumn: RANK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RANK
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 0699056d-44e0-4aa3-bcd4-b05abf1205f2
|
||||
summarizeBy: none
|
||||
sourceColumn: RANK
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Class = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select CLASS,RANK from dm.dm_td_aia_class_rank
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Filtered Rows" = Table.SelectRows(Source, each ([CLASS] <> null and [CLASS] <> "" and [CLASS] <> "Others"))
|
||||
in
|
||||
#"Filtered Rows"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
table AIA_AdvanceAnalysis_DRAGON
|
||||
lineageTag: 989085eb-7dd4-4cd5-9bcc-630a7ce69d84
|
||||
|
||||
column DRAGON_FLAG
|
||||
dataType: string
|
||||
lineageTag: bf3618fb-2c9e-4a2a-80f9-9c2b3fc5c13c
|
||||
summarizeBy: none
|
||||
sourceColumn: DRAGON_FLAG
|
||||
sortByColumn: DRAGON_FLAG_ORDER
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DRAGON_FLAG_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: c80919a4-7f13-42a3-b7b2-deba2428023d
|
||||
summarizeBy: none
|
||||
sourceColumn: DRAGON_FLAG_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_DRAGON = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source = Dim_RC,
|
||||
#"Filtered datasource aia" = Table.SelectRows(Source, each [DATA_SOURCE]= "AIA(Monthly)"),
|
||||
#"Removed Other Columns" = Table.SelectColumns(#"Filtered datasource aia",{"DRAGON_FLAG"}),
|
||||
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns", {"DRAGON_FLAG"}),
|
||||
#"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each [DRAGON_FLAG] <> null and [DRAGON_FLAG] <> ""),
|
||||
#"Added Custom" = Table.AddColumn(#"Filtered Rows", "DRAGON_FLAG_ORDER", each if [DRAGON_FLAG] = "CORE" then 1 else if [DRAGON_FLAG] = "EMERGING" then 2 else if [DRAGON_FLAG] = "County" then 3 else if [DRAGON_FLAG] = "NON_TARGET" then 4 else if [DRAGON_FLAG] = "Others" then 5 else 9),
|
||||
#"Appended Query" = Table.Combine({#"Added Custom",
|
||||
Table.FromRecords({ [DRAGON_FLAG = "Market", DRAGON_FLAG_ORDER = -1]})}),
|
||||
#"Changed Type" = Table.TransformColumnTypes(#"Appended Query",{{"DRAGON_FLAG_ORDER", Int64.Type}})
|
||||
in
|
||||
#"Changed Type"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
table AIA_AdvanceAnalysis_Decile
|
||||
lineageTag: 0b24affa-31b0-411f-90c3-c84335e80666
|
||||
|
||||
column DECILE
|
||||
dataType: string
|
||||
lineageTag: 4f944666-1079-4c5d-b8aa-20d51d996c9f
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE
|
||||
sortByColumn: DECILE_ORDER
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DECILE_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 7d1cb240-7c05-41f0-a8af-f40d8f02138d
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Decile = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source = Dim_HP_Potential_AIA,
|
||||
#"Filtered datasource aia" = Table.SelectRows(Source, each [DATA_SOURCE]= "AIA(Monthly)"),
|
||||
#"Removed Other Columns" = Table.SelectColumns(#"Filtered datasource aia",{"DECILE"}),
|
||||
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns", {"DECILE"}),
|
||||
#"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each [DECILE] <> null and [DECILE] <> ""),
|
||||
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"DECILE", Int64.Type}}),
|
||||
#"Sorted Rows" = Table.Sort(#"Changed Type",{{"DECILE", Order.Ascending}}),
|
||||
#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "DECILE_ORDER", 0, 1, Int64.Type),
|
||||
#"Changed Type1" = Table.TransformColumnTypes(#"Added Index",{{"DECILE", type text}}),
|
||||
#"Appended Query" = Table.Combine({#"Changed Type1",
|
||||
Table.FromRecords({ [DECILE = "Market", DECILE_ORDER = -1]})}),
|
||||
#"Changed Type2" = Table.TransformColumnTypes(#"Appended Query",{{"DECILE_ORDER", Int64.Type}})
|
||||
in
|
||||
#"Changed Type2"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
table AIA_AdvanceAnalysis_Decile_Group
|
||||
lineageTag: fce896f9-d3fc-4520-9a21-5ef334648b04
|
||||
|
||||
column DECILE_GROUP
|
||||
dataType: string
|
||||
lineageTag: 1a443e88-4786-4c9e-aa46-afaa8fafef6e
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE_GROUP
|
||||
sortByColumn: DECILE_ORDER
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DECILE_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: d042ef30-baad-4675-86c6-48287795f635
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Decile_Group = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source = Dim_HP_Potential_AIA,
|
||||
#"Filtered datasource aia" = Table.SelectRows(Source, each [DATA_SOURCE]= "AIA(Monthly)"),
|
||||
#"Removed Other Columns" = Table.SelectColumns(#"Filtered datasource aia",{"DECILE_GROUP", "DECILE_ORDER"}),
|
||||
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns", {"DECILE_GROUP"}),
|
||||
#"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each [DECILE_GROUP] <> null and [DECILE_GROUP] <> ""),
|
||||
#"Appended Query" = Table.Combine({#"Filtered Rows",
|
||||
Table.FromRecords({ [DECILE_GROUP = "Market", DECILE_ORDER = -1]})}),
|
||||
#"Changed Type" = Table.TransformColumnTypes(#"Appended Query",{{"DECILE_ORDER", Int64.Type}})
|
||||
in
|
||||
#"Changed Type"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
table AIA_AdvanceAnalysis_Key_Competitor
|
||||
lineageTag: 9122e4fc-9030-4888-b909-269a57eefa95
|
||||
|
||||
column KEY_COMPETITOR_CN
|
||||
dataType: string
|
||||
lineageTag: 2253de02-adea-4c35-ae88-f6f3789dfaba
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR_CN
|
||||
sortByColumn: RANK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RANK
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 69da8511-4c42-4d23-a6b0-61f37d2180ea
|
||||
summarizeBy: none
|
||||
sourceColumn: RANK
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Key_Competitor = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select t1.KEY_COMPETITOR_CN,t1.RANK
|
||||
from dm.dm_td_aia_key_competitor_rank t1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Filtered Rows" = Table.SelectRows(Source, each [KEY_COMPETITOR_CN] <> null and [KEY_COMPETITOR_CN] <> "")
|
||||
in
|
||||
#"Filtered Rows"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
table AIA_AdvanceAnalysis_Mole
|
||||
lineageTag: 5fc523f6-793c-4f6b-b658-d1df4c4281bb
|
||||
|
||||
column CMPS_DES_C
|
||||
dataType: string
|
||||
lineageTag: 2145d759-6e23-4797-8352-b3c14076b7a2
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_DES_C
|
||||
sortByColumn: RANK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RANK
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 8f4b893c-bf05-4840-b0a8-b78b663d6a67
|
||||
summarizeBy: none
|
||||
sourceColumn: RANK
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Mole = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select CMPS_DES_C,RANK from dm.dm_td_aia_molecule_rank
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Filtered Rows" = Table.SelectRows(Source, each [CMPS_DES_C] <> null and [CMPS_DES_C] <> "")
|
||||
in
|
||||
#"Filtered Rows"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
table AIA_AdvanceAnalysis_Subchannel
|
||||
lineageTag: 669bd2ed-cd1a-4054-a745-824bc171cd86
|
||||
|
||||
column SUB_CHANNEL
|
||||
dataType: string
|
||||
lineageTag: 8d030a17-0c91-4c24-9dde-29ad769b6553
|
||||
summarizeBy: none
|
||||
sourceColumn: SUB_CHANNEL
|
||||
sortByColumn: SUB_CHANNEL_ORDER
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SUB_CHANNEL_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: d40b632c-ae6f-4ef0-ab4a-8908a92cae88
|
||||
summarizeBy: none
|
||||
sourceColumn: SUB_CHANNEL_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition AIA_AdvanceAnalysis_Subchannel = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source = Dim_RC,
|
||||
#"Filtered datasource aia" = Table.SelectRows(Source, each [DATA_SOURCE]= "AIA(Monthly)"),
|
||||
#"Removed Other Columns" = Table.SelectColumns(#"Filtered datasource aia",{"SUB_CHANNEL", "SUB_CHANNEL_ORDER"}),
|
||||
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns", {"SUB_CHANNEL"}),
|
||||
#"Filtered Rows" = Table.SelectRows(#"Removed Duplicates", each [SUB_CHANNEL] <> null and [SUB_CHANNEL] <> ""),
|
||||
#"Appended Query" = Table.Combine({#"Filtered Rows",
|
||||
Table.FromRecords({ [SUB_CHANNEL = "Market", SUB_CHANNEL_ORDER = -1]})}),
|
||||
#"Changed Type" = Table.TransformColumnTypes(#"Appended Query",{{"SUB_CHANNEL_ORDER", Int64.Type}})
|
||||
in
|
||||
#"Changed Type"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 08
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
table AIA_Calgroup
|
||||
lineageTag: 95afe94f-043e-413c-828d-7e26d67b9034
|
||||
|
||||
calculationGroup
|
||||
precedence: 6
|
||||
|
||||
calculationItem 所有机构 = SELECTEDMEASURE()
|
||||
|
||||
calculationItem 剔除部分机构 =
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
),
|
||||
KEEPFILTERS ( Dim_Remove_inst[AIA_REMOVE] = 1 )
|
||||
)
|
||||
|
||||
column AIA_INS_REMOVE
|
||||
dataType: string
|
||||
lineageTag: 48ba6489-c1d2-490f-a06e-70616eba2e34
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: ced1bbf9-05e0-477a-965f-b14073640119
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
table AIA_Decile_CalGroup
|
||||
lineageTag: 58c67585-06ec-42ab-9a98-36b066c8d071
|
||||
|
||||
calculationGroup
|
||||
precedence: 4
|
||||
|
||||
calculationItem AIA_Sales_FRpage = ```
|
||||
|
||||
IF( NOT (
|
||||
ISEMPTY (
|
||||
INTERSECT ( { 109, 110 ,114}, VALUES ( 'AIA.Fields.Rows'[AIA.Fields.Rows Order] ) )
|
||||
)
|
||||
)
|
||||
|| (
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE] ) ||
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE_GROUP] ) ||
|
||||
ISFILTERED( Dim_IsEagle_AIASpecial[is_eagle] )
|
||||
),
|
||||
IF(ISFILTERED ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) && ISFILTERED ( Dim_Market[MARKET] ) || SELECTEDMEASURENAME() IN {"show_filters.AIA","4.1 DECILE_TEXT","4.1 POTENTIAL_TEXT"},
|
||||
SELECTEDMEASURE()),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE(),
|
||||
ALL ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) )
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// IF( NOT ISEMPTY (
|
||||
// INTERSECT ( { 109, 110 }, VALUES ( 'AIA.Fields.Rows'[AIA.Fields.Rows Order] ) )),
|
||||
// IF(ISFILTERED ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) && ISFILTERED ( Dim_Market[MARKET] ) || SELECTEDMEASURENAME() IN {"show_filters.AIA","4.1 DECILE_TEXT","4.1 POTENTIAL_TEXT"},
|
||||
// SELECTEDMEASURE()),
|
||||
// CALCULATE (
|
||||
// SELECTEDMEASURE(),
|
||||
// ALL ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) )
|
||||
// )
|
||||
```
|
||||
|
||||
calculationItem AIA_Sales_MApage = ```
|
||||
|
||||
IF( NOT ISEMPTY (
|
||||
INTERSECT ( { 8,9 }, VALUES ( 'AIA.Fields_Geo'[AIA.Fields_Geo 个订单] ))),
|
||||
IF(ISFILTERED ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) && ISFILTERED ( Dim_Market[MARKET] )||SELECTEDMEASURENAME() ="AIA.warning2.3",
|
||||
SELECTEDMEASURE()),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE(),
|
||||
ALL ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) )
|
||||
)
|
||||
```
|
||||
|
||||
calculationItem AIA_Sales_AApage_3_1 = ```
|
||||
|
||||
IF( (NOT ISEMPTY (
|
||||
INTERSECT ( { 8,9 }, VALUES ( 'AIA.Fields_Geo'[AIA.Fields_Geo 个订单] )))) || OR (
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE] ),
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE_GROUP] )
|
||||
),
|
||||
IF(ISFILTERED ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) && ISFILTERED ( Dim_Market[MARKET] ),
|
||||
SELECTEDMEASURE()),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE(),
|
||||
ALL ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) )
|
||||
)
|
||||
```
|
||||
|
||||
calculationItem AIA_Sales_AApage_3_2 = ```
|
||||
|
||||
IF( (NOT ISEMPTY (
|
||||
INTERSECT ( { 0,1 }, VALUES ( 'AIA.Fields_Decile'[AIA.Fields_Decile 个订单] )))) || OR (
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE] ),
|
||||
ISFILTERED ( Dim_HP_Potential_AIA[DECILE_GROUP] )
|
||||
),
|
||||
IF(ISFILTERED ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) && ISFILTERED ( Dim_Market[MARKET] ),
|
||||
SELECTEDMEASURE()),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE(),
|
||||
ALL ( Dim_HP_Potential_AIA[IS_DEFAULT_MKT_FLAG] ) )
|
||||
)
|
||||
```
|
||||
|
||||
column AIA_FreeReport
|
||||
dataType: string
|
||||
lineageTag: 009e7d2c-48cc-45d7-b073-bbb246091b11
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 1fe615fa-c4eb-4f0a-8f4b-7e003947dcd7
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
table AIA_Merge_Data
|
||||
lineageTag: 707667ad-59ab-4dcd-b72c-c8b7f04c3e2c
|
||||
|
||||
calculationGroup
|
||||
precedence: 8
|
||||
|
||||
calculationItem AIA_MergeData_WithBlank = IF( NOT ( ISFILTERED(Dim_Market[MARKET]) || ISFILTERED( Dim_BrandDefaultMKT[MARKET])), BLANK(),SELECTEDMEASURE())
|
||||
|
||||
calculationItem AIA_MERGE_DATA_5_2 =
|
||||
VAR _isfilter =
|
||||
CALCULATE (
|
||||
NOT ISEMPTY ( Fields_Merged_Data ),
|
||||
TREATAS ( { 5, 3 }, Fields_Merged_Data[Value5] )
|
||||
)
|
||||
VAR _isfilter_city =
|
||||
ISFILTERED ( Dim_Geo[CITY_C] )
|
||||
|| ISFILTERED ( Dim_Geo[MERGED_DATA_CITY_C] )
|
||||
|| CALCULATE (
|
||||
NOT ISEMPTY ( Fields_Merged_Data ),
|
||||
KEEPFILTERS (
|
||||
TREATAS (
|
||||
{ 313, 314 },
|
||||
Fields_Merged_Data[Fields_Merged_Data Order]
|
||||
)
|
||||
)
|
||||
)
|
||||
VAR _egfr_tj =
|
||||
IF (
|
||||
HASONEVALUE ( Dim_Market[MARKET] ),
|
||||
IF (
|
||||
VALUES ( Dim_Market[MARKET] ) = "EGFR TKI MARKET"
|
||||
&& SELECTEDVALUE ( Dim_Geo[PROVINCE_C] ) = "天津",
|
||||
TRUE ( )
|
||||
)
|
||||
)
|
||||
RETURN
|
||||
SWITCH (
|
||||
TRUE ( ),
|
||||
( ISFILTERED ( Dim_Market ) || ISFILTERED ( Dim_BrandDefaultMKT )
|
||||
|| ISFILTERED ( Dim_MarketTA[TA] ) )
|
||||
&& _egfr_tj,
|
||||
// 选了 EGFR TKI MARKET
|
||||
SWITCH (
|
||||
TRUE ( ),
|
||||
// 筛选city dtp不参与计算
|
||||
( OR ( ISFILTERED ( Dim_Org ), ISFILTERED ( Dim_Geo ) )
|
||||
|| _isfilter )
|
||||
&& AND (
|
||||
NOT ISFILTERED ( Dim_Market ),
|
||||
SELECTEDVALUE ( Dim_MarketTA[TA] ) = "onco"
|
||||
)
|
||||
&& [IsMerge]
|
||||
&& _isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS ( Dim_MergeDataSource[DATA_SOURCE] <> "DTP" ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
,
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
( OR ( ISFILTERED ( Dim_Org ), ISFILTERED ( Dim_Geo ) )
|
||||
|| _isfilter )
|
||||
&& AND (
|
||||
NOT ISFILTERED ( Dim_Market ),
|
||||
SELECTEDVALUE ( Dim_MarketTA[TA] ) = "onco"
|
||||
)
|
||||
&& [IsMerge],
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS ( Dim_MergeDataSource[DATA_SOURCE] <> "DTP" ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ) // ,KEEPFILTERS( Fact_Sales[DTP_FLAG] <>1 )
|
||||
,
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
),
|
||||
// 筛选city dtp不参与计算
|
||||
( ISFILTERED ( Dim_Org ) || ISFILTERED ( Dim_Geo ) || _isfilter )
|
||||
&& _isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
,
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
( ISFILTERED ( Dim_Org ) || ISFILTERED ( Dim_Geo ) || _isfilter ),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
),
|
||||
// 筛选city dtp不参与计算
|
||||
_isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_CHAP_DTP_NOAIA] ),
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
,
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_CHAP_DTP_NOAIA] ),
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[EGFR_FLAG] = 0 )
|
||||
)
|
||||
),
|
||||
ISFILTERED ( Dim_Market ) || ISFILTERED ( Dim_BrandDefaultMKT )
|
||||
|| ISFILTERED ( Dim_MarketTA[TA] ),
|
||||
CALCULATE (
|
||||
SWITCH (
|
||||
TRUE ( ),
|
||||
// 筛选city dtp不参与计算
|
||||
( OR ( ISFILTERED ( Dim_Org ), ISFILTERED ( Dim_Geo ) )
|
||||
|| _isfilter )
|
||||
&& AND (
|
||||
NOT ISFILTERED ( Dim_Market ),
|
||||
SELECTEDVALUE ( Dim_MarketTA[TA] ) = "onco"
|
||||
)
|
||||
&& [IsMerge]
|
||||
&& _isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS ( Dim_MergeDataSource[DATA_SOURCE] <> "DTP" ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
( OR ( ISFILTERED ( Dim_Org ), ISFILTERED ( Dim_Geo ) )
|
||||
|| _isfilter )
|
||||
&& AND (
|
||||
NOT ISFILTERED ( Dim_Market ),
|
||||
SELECTEDVALUE ( Dim_MarketTA[TA] ) = "onco"
|
||||
)
|
||||
&& [IsMerge],
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
KEEPFILTERS ( Dim_MergeDataSource[DATA_SOURCE] <> "DTP" ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ) // ,KEEPFILTERS( Fact_Sales[DTP_FLAG] <>1 )
|
||||
),
|
||||
// 筛选city dtp不参与计算
|
||||
( ISFILTERED ( Dim_Org ) || ISFILTERED ( Dim_Geo ) || _isfilter )
|
||||
&& _isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
( ISFILTERED ( Dim_Org ) || ISFILTERED ( Dim_Geo ) || _isfilter ),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_MKT] ),
|
||||
Fact_Sales[MERGEDATA_FLAG_DTP_NOROC] = 1,
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" )
|
||||
),
|
||||
// 筛选city dtp不参与计算
|
||||
_isfilter_city,
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_CHAP_DTP_NOAIA] ),
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" ),
|
||||
KEEPFILTERS ( Fact_Sales[DTP_FLAG] <> 1 ) // 筛选city dtp不参与计算
|
||||
),
|
||||
// 不筛选city dtp参与计算
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( ),
|
||||
USERELATIONSHIP ( Dim_MergeDataSource[DATA_SOURCE], Fact_Sales[MERGEDATA_FLAG_CHAP_DTP_NOAIA] ),
|
||||
KEEPFILTERS ( Fact_Sales[MERGED_DATA_DTP_OTHERS] <> "2" )
|
||||
)
|
||||
),
|
||||
KEEPFILTERS (
|
||||
Dim_Market[MKT_SOURCE] <> "Amivantamab MarketDTP(Quarterly)"
|
||||
),
|
||||
KEEPFILTERS (
|
||||
NOT Dim_Market[MARKET] IN
|
||||
{
|
||||
"RE Market",
|
||||
"Respules Market",
|
||||
"RE Market (Global)",
|
||||
"RE Extended Market",
|
||||
"Pulmicort VBP Benchmark Market",
|
||||
"TCM Market"
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
column mergedata_5_2
|
||||
dataType: string
|
||||
lineageTag: ecc49b49-ac91-4771-b6c5-8d73a0e7def4
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 5e3db0d8-34b0-4c87-87ee-ad91439771b3
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
table AIA_Merged_Data_opt
|
||||
lineageTag: 4e60a050-beac-4658-927a-1adaa68698d0
|
||||
|
||||
calculationGroup
|
||||
precedence: 10
|
||||
|
||||
calculationItem AIA_Merged_Data_opt =
|
||||
IF (
|
||||
HASONEVALUE ( Dim_Market[MARKET] ),
|
||||
SWITCH (
|
||||
TRUE (),
|
||||
VALUES ( Dim_Market[MARKET] ) = "egfr tki market",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
KEEPFILTERS ( TREATAS ( { "CHPA", "AIA" }, Fact_Sales[MERGEDATA_FLAG_MKT] ) )
|
||||
),
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
KEEPFILTERS ( NOT Fact_Sales[MERGEDATA_FLAG_MKT] IN { "normal" } )
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
column AIA_Merged_Data_5_1
|
||||
dataType: string
|
||||
lineageTag: f8ea23fe-2e5c-461c-bbc8-ea7f143cd534
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: e6eab474-3b2f-48b2-ba56-05d7ce5ddcd7
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
table AIA_TargetWithBlank
|
||||
lineageTag: 85d5e1a2-99f0-4148-ba4b-aac1b21d04dc
|
||||
|
||||
calculationGroup
|
||||
precedence: 9
|
||||
|
||||
calculationItem IstargetWithBlank = IF(ISFILTERED(Dim_Org),CALCULATE( SELECTEDMEASURE(),KEEPFILTERS(Dim_RC_Merged_Data[IS_TARGET_HP]="y")),SELECTEDMEASURE())
|
||||
|
||||
column AIA_TargetWithBlank
|
||||
dataType: string
|
||||
lineageTag: ad3da0d7-cd4e-43cb-a9c6-884a4642b479
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 729b888f-a9a8-4ff9-b6d4-037f290f1e3a
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 02_CalGroup
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
table CONFIG_ACCESS
|
||||
lineageTag: 90d66d62-7f90-4e78-9a33-69d1c7a8e0e0
|
||||
|
||||
calculationGroup
|
||||
precedence: 3
|
||||
|
||||
calculationItem AIA = ```
|
||||
|
||||
VAR userrole =
|
||||
CALCULATE (
|
||||
MAX ( dm_auth_aia_sales_org[role] ),
|
||||
dm_auth_aia_sales_org[KCODE] = customdata()
|
||||
)
|
||||
RETURN
|
||||
IF (
|
||||
COUNTROWS ( 'CONFIG_ACCESS_ROLE' ) = 1,
|
||||
SWITCH (
|
||||
userrole,
|
||||
"nsd",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_geo[AUDIT_SOURCE] ),
|
||||
Dim_Geo[AUDIT_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_mkt[MKT_SOURCE] ), Dim_Market[MKT_SOURCE] ),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_pack[PACK_SOURCE] ),
|
||||
Dim_PackInfo[PACK_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_org[KCODE] ), Dim_Org[nsd_kcode] )
|
||||
),
|
||||
"rsd",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_geo[AUDIT_SOURCE] ),
|
||||
Dim_Geo[AUDIT_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_mkt[MKT_SOURCE] ), Dim_Market[MKT_SOURCE] ),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_pack[PACK_SOURCE] ),
|
||||
Dim_PackInfo[PACK_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_org[KCODE] ), Dim_Org[rsd_kcode] )
|
||||
),
|
||||
"rsm",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_geo[AUDIT_SOURCE] ),
|
||||
Dim_Geo[AUDIT_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_mkt[MKT_SOURCE] ), Dim_Market[MKT_SOURCE] ),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_pack[PACK_SOURCE] ),
|
||||
Dim_PackInfo[PACK_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_org[KCODE] ), Dim_Org[rsm_kcode] )
|
||||
),
|
||||
"dsm",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE (),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_geo[AUDIT_SOURCE] ),
|
||||
Dim_Geo[AUDIT_SOURCE]
|
||||
),
|
||||
TREATAS ( VALUES ( dm_auth_aia_sales_mkt[MKT_SOURCE] ), Dim_Market[MKT_SOURCE] ),
|
||||
TREATAS (
|
||||
VALUES ( dm_auth_aia_sales_pack[PACK_SOURCE] ),
|
||||
Dim_PackInfo[PACK_SOURCE]
|
||||
)
|
||||
// TREATAS ( VALUES ( dm_auth_aia_sales_org[KCODE] ), Dim_Org[dsm_kcode] )
|
||||
)
|
||||
),
|
||||
SELECTEDMEASURE ()
|
||||
)
|
||||
```
|
||||
|
||||
calculationItem AIA_MERGE_DATA =
|
||||
VAR userrole =
|
||||
CALCULATE (
|
||||
MAX ( DM_AUTH_MERGED_DATA[role] ),
|
||||
DM_AUTH_MERGED_DATA[sub_code] = CUSTOMDATA ( )
|
||||
)
|
||||
RETURN
|
||||
IF (
|
||||
COUNTROWS ( CONFIG_ACCESS_ROLE ) = 1
|
||||
, SWITCH (
|
||||
userrole
|
||||
, "nsd",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( )
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_RC_Merged_Data[MARKET]
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
)
|
||||
, KEEPFILTERS ( Dim_Remove_inst[aia_remove] = 1 )
|
||||
)
|
||||
, "rsd",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( )
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_RC_Merged_Data[MARKET]
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
)
|
||||
, KEEPFILTERS ( Dim_Remove_inst[aia_remove] = 1 )
|
||||
)
|
||||
, "rsm",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( )
|
||||
, KEEPFILTERS (
|
||||
TREATAS (
|
||||
VALUES ( DM_AUTH_MERGED_DATA[parent_code] ),
|
||||
Dim_Org[rsd_kcode]
|
||||
)
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_RC_Merged_Data[MARKET]
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
)
|
||||
, KEEPFILTERS ( Dim_Remove_inst[aia_remove] = 1 )
|
||||
)
|
||||
, "dsm",
|
||||
CALCULATE (
|
||||
SELECTEDMEASURE ( )
|
||||
, KEEPFILTERS (
|
||||
TREATAS (
|
||||
VALUES ( DM_AUTH_MERGED_DATA[parent_code] ),
|
||||
Dim_Org[rsm_kcode]
|
||||
)
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_RC_Merged_Data[MARKET]
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
)
|
||||
, KEEPFILTERS ( Dim_Remove_inst[aia_remove] = 1 )
|
||||
)
|
||||
)
|
||||
, CALCULATE (
|
||||
SELECTEDMEASURE ( )
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_RC_Merged_Data[MARKET]
|
||||
)
|
||||
, TREATAS (
|
||||
VALUES ( Dim_Market[MARKET] ),
|
||||
Dim_Remove_inst[MARKET]
|
||||
)
|
||||
, KEEPFILTERS ( Dim_Remove_inst[aia_remove] = 1 )
|
||||
)
|
||||
)
|
||||
|
||||
column ACCESS_REPORT
|
||||
dataType: string
|
||||
lineageTag: 02aee34d-50bf-4579-9e95-a19175d12c9d
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Ordinal
|
||||
dataType: int64
|
||||
isHidden
|
||||
lineageTag: 56574631-d80b-4456-94be-c6006a718da7
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
table CONFIG_ACCESS_ROLE
|
||||
lineageTag: 333e8038-185d-471b-83aa-95dac250dc5e
|
||||
|
||||
column ROLE
|
||||
lineageTag: 44ea388f-b05f-44e2-b6ad-96a275d76529
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [ROLE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition CONFIG_ACCESS_ROLE = calculated
|
||||
mode: import
|
||||
source =
|
||||
|
||||
SELECTCOLUMNS(
|
||||
{
|
||||
("PI_SALES"),
|
||||
("PI_SALES_DSM")
|
||||
},
|
||||
"ROLE", [Value]
|
||||
)
|
||||
|
||||
annotation PBI_Id = 448c2cfa0e5a4a1e990fc6e066d550c3
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
table CONFIG_REPORT
|
||||
lineageTag: f5f33ea9-610e-4ff6-bf59-e5f339a4a43e
|
||||
|
||||
column Value
|
||||
lineageTag: 059fa053-913b-47b5-bc4a-6ba89d5477db
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Value]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition CONFIG_REPORT = calculated
|
||||
mode: import
|
||||
source = {"AIA","MA"}
|
||||
|
||||
annotation PBI_Id = fdcd17e6ebd043c1b83596b394bec746
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
table Config_EmailWarning
|
||||
lineageTag: f7fd4b37-e5c1-4e0f-9c2c-e4b4c236bf39
|
||||
|
||||
column data_source
|
||||
dataType: string
|
||||
lineageTag: d049cccf-6b71-4008-88cf-4a7f50e3dbf7
|
||||
summarizeBy: none
|
||||
sourceColumn: data_source
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column max_data
|
||||
dataType: string
|
||||
lineageTag: b9f319ba-e4a6-4e4e-8923-8cb220e749c0
|
||||
summarizeBy: none
|
||||
sourceColumn: max_data
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column if_update
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 2228928e-cbd5-4d53-84da-ef83220d11b1
|
||||
summarizeBy: sum
|
||||
sourceColumn: if_update
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_EmailWarning = m
|
||||
mode: import
|
||||
queryGroup: 邮件通知
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select
|
||||
data_source
|
||||
,max_data
|
||||
,if_update
|
||||
from dws.dws_ext_email_warning
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
table Config_MarketRatio
|
||||
lineageTag: 246bb2c8-ab30-4d25-a0d0-51951b46bb1a
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: d7619034-8051-4a7e-bdeb-fd680a4644b8
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 7e1f1f9c-ebe1-4050-8c12-8a0c50adf6ff
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column brandratio_countingunit_level
|
||||
dataType: string
|
||||
lineageTag: 4ab3d25d-feac-4e06-9a21-18891951a6b4
|
||||
summarizeBy: none
|
||||
sourceColumn: brandratio_countingunit_level
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_MarketRatio = m
|
||||
mode: import
|
||||
queryGroup: OLD
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
with all_pack_pack_property as (
|
||||
select Market,Pack_cod,CMPS_COD from dm.dm_aia_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,iqvia_pack_code,CMPS_COD from dm.dm_zk_ec_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,PACK_COD,CMPS_COD from dm.dm_chc_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,PACK_COD,CMPS_COD from dm.dm_thc_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,PACK_COD,CMPS_COD from dm.dm_ext_county_td_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,iqvia_pack_code,CMPS_COD from dm.dm_zk_retail_dtp_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,iqvia_pack_code,CMPS_COD from dm.dm_zk_retail_pack_property group by 1,2,3
|
||||
union
|
||||
select Market,pack_cod,CMPS_COD from DWS.dws_ims_td_market_ratio group by 1,2,3)
|
||||
,brand_ratio as (
|
||||
SELECT distinct market,
|
||||
CASE WHEN length(cmps_cod) < 6 THEN RIGHT(CONCAT('000000',cmps_cod),6) ELSE cmps_cod END AS cmps_cod,
|
||||
cmps_des,
|
||||
CASE WHEN length(pack_cod) < 12 and pack_cod REGEXP '^[0-9]' THEN RIGHT(CONCAT('000000000000',pack_cod),12) ELSE pack_cod END AS pack_cod,
|
||||
pack_des,
|
||||
level,
|
||||
type,
|
||||
ratio
|
||||
from dwd.dwd_gnd_ims_tblBrandRatio
|
||||
)
|
||||
,match_data as(
|
||||
select
|
||||
t1.PACK_COD,
|
||||
t1.MARKET
|
||||
-- case when t6.ratio is not null then t1.market_ratio * t6.ratio
|
||||
-- else t1.market_ratio * NVL(t7.ratio,1)
|
||||
-- end as VALUE_MARKET_RATIO,
|
||||
-- case when t2.ratio is not null then t1.market_ratio * t2.ratio
|
||||
-- else t1.market_ratio * NVL(t3.ratio,1)
|
||||
-- end as UNIT_MARKET_RATIO,
|
||||
-- t1.market_ratio as COUNTINGUNIT_MARKET_RATIO,
|
||||
-- case when t4.ratio is not null then t1.market_ratio * t4.ratio
|
||||
-- else t1.market_ratio * NVL(t5.ratio,1)
|
||||
-- end as PDOT_MARKET_RATIO
|
||||
|
||||
,case
|
||||
when t6.PACK_COD is not null then t6.level
|
||||
when t7.CMPS_COD is not null then t7.level else null end as brandratio_value_level
|
||||
,case
|
||||
when t2.PACK_COD is not null then t2.level
|
||||
when t3.CMPS_COD is not null then t3.level else null end as brandratio_unit_level
|
||||
,case
|
||||
when t4.PACK_COD is not null then t4.level
|
||||
when t5.CMPS_COD is not null then t5.level else null end as brandratio_countingunit_level
|
||||
|
||||
from all_pack_pack_property t1
|
||||
--unit by Pack
|
||||
left join (select * from brand_ratio where upper(type) = 'UNIT' and upper(Level) = 'PACK') t2
|
||||
on t1.PACK_COD = t2.pack_cod
|
||||
and t1.MARKET = t2.market
|
||||
--unit by MOLECULE
|
||||
left join (select * from brand_ratio where upper(type) = 'UNIT' and upper(Level) = 'MOLECULE') t3
|
||||
on t1.CMPS_COD = t3.cmps_cod
|
||||
and t1.MARKET = t3.market
|
||||
--PDOT by Pack
|
||||
left join (select * from brand_ratio where upper(type) = 'COUNTINGUNIT' and upper(Level) = 'PACK') t4
|
||||
on t1.PACK_COD = t4.pack_cod
|
||||
and t1.MARKET = t4.market
|
||||
--PDOT by MOLECULE
|
||||
left join (select * from brand_ratio where upper(type) = 'COUNTINGUNIT' and upper(Level) = 'MOLECULE') t5
|
||||
on t1.CMPS_COD = t5.cmps_cod
|
||||
and t1.MARKET = t5.market
|
||||
--VALUE by Pack
|
||||
left join (select * from brand_ratio where upper(type) = 'VALUE' and upper(Level) = 'PACK') t6
|
||||
on t1.PACK_COD = t6.pack_cod
|
||||
and t1.MARKET = t6.market
|
||||
--VALUE by MOLECULE
|
||||
left join (select * from brand_ratio where upper(type) = 'VALUE' and upper(Level) = 'MOLECULE') t7
|
||||
on t1.CMPS_COD = t7.cmps_cod
|
||||
and t1.MARKET = t7.market
|
||||
)
|
||||
select
|
||||
MARKET
|
||||
,PACK_COD
|
||||
-- ,brandratio_value_level
|
||||
-- ,brandratio_unit_level
|
||||
,nvl(brandratio_countingunit_level,'Market') as brandratio_countingunit_level
|
||||
from match_data
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
table Config_MergeData
|
||||
lineageTag: 0cfa76d9-0320-4b9c-872d-12c4553bd77a
|
||||
|
||||
column MergeData
|
||||
dataType: string
|
||||
lineageTag: 1f24edcf-c898-4533-96db-9cff0d49f89b
|
||||
summarizeBy: none
|
||||
sourceColumn: MergeData
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_MergeData = m
|
||||
mode: import
|
||||
queryGroup: OLD
|
||||
source =
|
||||
let
|
||||
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Weta951nfUpeQAKXYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [MergeData = _t]),
|
||||
#"Changed Type" = Table.TransformColumnTypes(Source,{{"MergeData", type text}})
|
||||
in
|
||||
#"Changed Type"
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
table Config_PageFlag_FreeReportNIAD
|
||||
lineageTag: 97ac9560-aebd-49b9-a0b6-1c767ecc310d
|
||||
|
||||
column IS_FreeReportNIAD
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: f6912d7d-4bb3-4c46-9399-f518f8070930
|
||||
summarizeBy: sum
|
||||
sourceColumn: IS_FreeReportNIAD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_PageFlag_FreeReportNIAD = m
|
||||
mode: import
|
||||
queryGroup: OLD
|
||||
source =
|
||||
let
|
||||
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [IS_FreeReportNIAD = _t]),
|
||||
#"Changed Type" = Table.TransformColumnTypes(Source,{{"IS_FreeReportNIAD", Int64.Type}})
|
||||
in
|
||||
#"Changed Type"
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table Config_ReportURL
|
||||
lineageTag: 1d0a1784-ea07-43e3-a252-8e9c7e4e13e5
|
||||
|
||||
column ReportName
|
||||
dataType: string
|
||||
lineageTag: 673e0ce4-5ea0-4486-9b93-9faae609ba3b
|
||||
summarizeBy: none
|
||||
sourceColumn: ReportName
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column URL
|
||||
dataType: string
|
||||
lineageTag: 6fff97a0-ff4a-4448-8b79-0116d3755fa5
|
||||
summarizeBy: none
|
||||
sourceColumn: URL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_ReportURL = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_辅助表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"select ReportName,URL from dm.dm_td_report_url"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
table Config_VisualFlag
|
||||
lineageTag: 3cf05043-2a07-42d6-9767-59c31de5af8d
|
||||
|
||||
column Flag_ID
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 00ae7e4d-11a5-4549-b0ad-40c08a75dcfd
|
||||
summarizeBy: count
|
||||
sourceColumn: Flag_ID
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Visual_Name
|
||||
dataType: string
|
||||
lineageTag: a58b3b69-f90a-45e9-9bb7-9d5775d0cb69
|
||||
summarizeBy: none
|
||||
sourceColumn: Visual_Name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Config_VisualFlag = m
|
||||
mode: import
|
||||
queryGroup: OLD
|
||||
source =
|
||||
let
|
||||
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTLUM1SKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Flag_ID = _t, Visual_Name = _t]),
|
||||
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Flag_ID", Int64.Type}})
|
||||
in
|
||||
#"Changed Type"
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 03_ConfigTable
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
table DM_AIA_TD_HOSPITAL_NOT_PROVIDED
|
||||
lineageTag: bff103bf-57fe-4525-b9d9-c00c70bd4bb1
|
||||
|
||||
column year
|
||||
dataType: string
|
||||
lineageTag: 21e39428-ec06-416c-9099-5526be33c51b
|
||||
summarizeBy: none
|
||||
sourceColumn: year
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column cpa_ins_code
|
||||
dataType: string
|
||||
lineageTag: 012e617a-e848-4bf6-bf69-2825a07e5dc6
|
||||
summarizeBy: none
|
||||
sourceColumn: cpa_ins_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column az_ins_code
|
||||
dataType: string
|
||||
lineageTag: 9a90db67-84e5-461c-89f6-e63a157a31e0
|
||||
summarizeBy: none
|
||||
sourceColumn: az_ins_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column az_ins_name
|
||||
dataType: string
|
||||
lineageTag: 1e78efe8-850b-4688-b9b2-6caaaf4f922c
|
||||
summarizeBy: none
|
||||
sourceColumn: az_ins_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column January
|
||||
dataType: string
|
||||
lineageTag: 1d23bba2-e044-4f09-8d67-1f8a724f0f57
|
||||
summarizeBy: none
|
||||
sourceColumn: January
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column February
|
||||
dataType: string
|
||||
lineageTag: 5d44e285-4fa0-4990-a7dd-89a52cdd894b
|
||||
summarizeBy: none
|
||||
sourceColumn: February
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column March
|
||||
dataType: string
|
||||
lineageTag: d7cbbdbf-ab08-45e6-ab6f-bff5fe7365c8
|
||||
summarizeBy: none
|
||||
sourceColumn: March
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column April
|
||||
dataType: string
|
||||
lineageTag: 085e12ae-070b-4088-adde-d63a30e40186
|
||||
summarizeBy: none
|
||||
sourceColumn: April
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column May
|
||||
dataType: string
|
||||
lineageTag: 35ae20e2-2c67-4880-a74a-47bada1f37a1
|
||||
summarizeBy: none
|
||||
sourceColumn: May
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column June
|
||||
dataType: string
|
||||
lineageTag: 4091a229-2b26-40b6-b322-cc0960f45eb1
|
||||
summarizeBy: none
|
||||
sourceColumn: June
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column July
|
||||
dataType: string
|
||||
lineageTag: e95f16c0-d737-4056-9801-2e21694b1822
|
||||
summarizeBy: none
|
||||
sourceColumn: July
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column August
|
||||
dataType: string
|
||||
lineageTag: 2f6b2633-05bc-4fc4-8931-d6a5c540fd82
|
||||
summarizeBy: none
|
||||
sourceColumn: August
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column September
|
||||
dataType: string
|
||||
lineageTag: cc16c1d6-22d6-4ea6-bff2-5f3f5b848a44
|
||||
summarizeBy: none
|
||||
sourceColumn: September
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column October
|
||||
dataType: string
|
||||
lineageTag: 62f65a9b-0657-4f4d-90ff-e3305f4f8984
|
||||
summarizeBy: none
|
||||
sourceColumn: October
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column November
|
||||
dataType: string
|
||||
lineageTag: b8d75435-f853-4e15-98fb-13550eaf944b
|
||||
summarizeBy: none
|
||||
sourceColumn: November
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column December
|
||||
dataType: string
|
||||
lineageTag: 75f77d22-d4fd-46ca-8163-d81b30e02fb0
|
||||
summarizeBy: none
|
||||
sourceColumn: December
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AIA_TD_HOSPITAL_NOT_PROVIDED = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT *
|
||||
FROM dm.dm_td_aia_nosales_inst
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Removed Columns" = Table.RemoveColumns(Source,{"etl_insert_dt", "etl_update_dt"})
|
||||
in
|
||||
#"Removed Columns"
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
table DM_AUTH_EMAIL_NOTIFICATION
|
||||
lineageTag: f726acdb-befe-4e7b-b032-36acebc03ef9
|
||||
|
||||
column Kcode
|
||||
dataType: string
|
||||
lineageTag: 5d38c887-d326-4911-a2d1-efee0ff0e1af
|
||||
summarizeBy: none
|
||||
sourceColumn: Kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_EMAIL_NOTIFICATION = m
|
||||
mode: import
|
||||
queryGroup: 邮件通知
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select Kcode
|
||||
from dm.dm_tf_powerinsight_chart_rules
|
||||
where ChartId in ('ef790b8b-b344-4b48-96a7-11998227ff12', '9797906f-7f66-4b3b-8c26-86487cd1b854')
|
||||
and Rule NOT in ( 'PI_SALES','PI_SALES_DSM')
|
||||
group by 1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
table DM_AUTH_GEO
|
||||
lineageTag: 359e9953-e1c1-49c0-83c4-8462ed2f9a39
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: f234e40e-bc9e-4666-8a2a-267a90aa66ec
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CITY_CODE
|
||||
dataType: string
|
||||
lineageTag: c109951f-9fd3-43c6-b13c-bc7fbe5f8e04
|
||||
summarizeBy: none
|
||||
sourceColumn: CITY_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_GEO-e5d6513d-7db4-4665-b7b8-78c70ead69ac = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT KCODE
|
||||
,CITY_CODE
|
||||
FROM dm.DM_AUTH_GEO"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
table DM_AUTH_MERGED_DATA
|
||||
lineageTag: 12e68118-e97c-4313-9f17-061993fdaf9d
|
||||
|
||||
column sub_code
|
||||
dataType: string
|
||||
lineageTag: 4172b48e-71aa-4978-96bd-ed5f1c9bc924
|
||||
summarizeBy: none
|
||||
sourceColumn: sub_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column parent_code
|
||||
dataType: string
|
||||
lineageTag: 3443e253-7106-41b3-a75f-2ed9346af9c9
|
||||
summarizeBy: none
|
||||
sourceColumn: parent_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column role
|
||||
dataType: string
|
||||
lineageTag: 406627db-aa0d-4668-99e5-b890e7e61186
|
||||
summarizeBy: none
|
||||
sourceColumn: role
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_MERGED_DATA = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
with tmp_c_trtry (
|
||||
select
|
||||
mr_kcode,mr_name,mr_trty_code,
|
||||
dsm_kcode,dsm_name,dsm_trty_code,
|
||||
rsm_kcode,rsm_name,rsm_trty_code,
|
||||
rsd_kcode,rsd_name,rsd_trty_code,
|
||||
nsd_kcode,nsd_name,nsd_trty_code,
|
||||
bu_code,bu_name_en,sub_bu_code,sub_bu_name_en
|
||||
from dm.dm_td_org
|
||||
where yyyymm in ( select key_value from dm.dm_td_date_config where key_code = 'pfmc_cvh' )
|
||||
and mr_trty_code <> ''
|
||||
group by
|
||||
mr_kcode,mr_name,mr_trty_code,
|
||||
dsm_kcode,dsm_name,dsm_trty_code,
|
||||
rsm_kcode,rsm_name,rsm_trty_code,
|
||||
rsd_kcode,rsd_name,rsd_trty_code,
|
||||
nsd_kcode,nsd_name,nsd_trty_code,
|
||||
bu_code,bu_name_en,sub_bu_code,sub_bu_name_en
|
||||
)
|
||||
-- dsm
|
||||
select distinct
|
||||
dsm_kcode sub_code
|
||||
,rsm_kcode parent_code
|
||||
,'dsm' role
|
||||
from tmp_c_trtry
|
||||
union all
|
||||
-- rsm
|
||||
select distinct
|
||||
rsm_kcode sub_code
|
||||
,rsd_kcode parent_code
|
||||
,'rsm' role
|
||||
from tmp_c_trtry
|
||||
union all
|
||||
-- rsd
|
||||
select distinct
|
||||
rsd_kcode sub_code
|
||||
,nsd_kcode parent_code
|
||||
,'rsd' role
|
||||
from tmp_c_trtry
|
||||
union all
|
||||
-- nsd
|
||||
select distinct
|
||||
nsd_kcode sub_code
|
||||
,sub_bu_name_en parent_code
|
||||
,'nsd' role
|
||||
from tmp_c_trtry"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
table DM_AUTH_NONSALES_ORG
|
||||
lineageTag: 09679610-a913-41e2-b5a3-1e86c22d28f3
|
||||
|
||||
column USER_KCODE
|
||||
dataType: string
|
||||
lineageTag: 6a097a13-52e8-4a46-b45e-cf34d826888e
|
||||
summarizeBy: none
|
||||
sourceColumn: USER_KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: 102ca1e5-1068-4e24-845f-08cdc72cec33
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_NONSALES_ORG = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
USER_KCODE,
|
||||
TA
|
||||
FROM
|
||||
dm.dm_auth_nonsales_org
|
||||
WHERE
|
||||
TA IS NOT NULL
|
||||
GROUP BY 1,2
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
table DM_AUTH_NONSALES_TA
|
||||
lineageTag: e5fd7c58-15d2-40f0-af28-f086c4b671aa
|
||||
|
||||
column USER_KCODE
|
||||
dataType: string
|
||||
lineageTag: a3208e18-37c8-430f-9fa0-4ee0af022485
|
||||
summarizeBy: none
|
||||
sourceColumn: USER_KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column USER_ROLE
|
||||
dataType: string
|
||||
lineageTag: 92959efc-74bd-408e-8ab1-27db972e6f92
|
||||
summarizeBy: none
|
||||
sourceColumn: USER_ROLE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_CODE
|
||||
dataType: string
|
||||
lineageTag: 7d20db57-31f7-48a3-8f07-312a9033cc76
|
||||
summarizeBy: none
|
||||
sourceColumn: TA_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: 16ccf62d-f770-41ca-9b46-3c334923ba66
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_NONSALES_TA = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
WITH
|
||||
TEMP_TABLE (
|
||||
SELECT
|
||||
USER_KCODE,
|
||||
USER_ROLE,
|
||||
TA_CODE,
|
||||
TA
|
||||
FROM
|
||||
dm.dm_auth_nonsales_ta
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
TEMP_TABLE
|
||||
UNION ALL
|
||||
SELECT
|
||||
USER_KCODE,
|
||||
NULL USER_ROLE,
|
||||
NULL TA_CODE,
|
||||
'ALL' TA
|
||||
FROM
|
||||
TEMP_TABLE
|
||||
GROUP BY
|
||||
1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table DM_AUTH_ORG
|
||||
lineageTag: 7014b524-f2a9-49dd-9bc8-3d527bc33e7e
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: 10bd8c8d-fcf9-4188-b6f4-94cf8fea74ce
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SUB_BU_CODE
|
||||
dataType: string
|
||||
lineageTag: d17a5876-6680-45ea-a8b0-c9e2805bfc7a
|
||||
summarizeBy: none
|
||||
sourceColumn: SUB_BU_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_ORG-ff3adcfb-4089-49fc-97ba-aef12b2c6a11 = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"select KCODE,SUB_BU_CODE from dm.dm_auth_org"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table DM_AUTH_PRD
|
||||
lineageTag: d82aff3c-68b9-4053-8313-7af54672ae15
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: d924ce89-b0bb-4efe-b827-bf83b1ea0f95
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: a1a6b57e-510d-4ba2-aa43-19d8e88db5a0
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_PRD-156e654a-08dc-4207-acf8-87f52e5cdec8 = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"select KCODE,MARKET from dm.dm_auth_prd"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
table DM_AUTH_PRD_PACK
|
||||
lineageTag: 850155d7-33f0-41ae-b197-46bae17a488a
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: 13d7af7a-149a-425d-a156-4222b34802ac
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 3b09df08-53b4-43b7-92e4-21dfea778762
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_PRD_PACK = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT KCODE
|
||||
,PACK_COD
|
||||
FROM dm.DM_AUTH_PRD_PACK"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table DM_AUTH_SALES_GEO
|
||||
lineageTag: 7eba76c1-c55a-4332-862c-a7f889d0dfd5
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: a4ee81cf-851b-410c-8fa3-013e88ad9718
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_SOURCE
|
||||
dataType: string
|
||||
lineageTag: b1bc6795-8c43-4765-8221-ad686f6d23fa
|
||||
summarizeBy: none
|
||||
sourceColumn: AUDIT_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_SALES_GEO-0220891b-6e23-4cf1-affe-68bae564da7d = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT KCODE,AUDIT_SOURCE from dm.dm_auth_sales_geo"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table DM_AUTH_SALES_MKT
|
||||
lineageTag: 95c1419d-b919-4fb3-a321-b1a2a7010ecf
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: 6b6d193e-7174-4177-9fa5-773a949fad05
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 608085f3-dcf2-4e27-b22b-093f0a2f019f
|
||||
summarizeBy: none
|
||||
sourceColumn: MKT_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_SALES_MKT = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT KCODE,MKT_SOURCE from dm.dm_auth_sales_mkt"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
table DM_AUTH_SALES_ORG
|
||||
lineageTag: 332e5369-f527-4a67-8372-2a90cd347a7d
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: a2c8be77-1caf-4ebb-adad-ad23dfd06b6d
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column BU_CODE_AUTH
|
||||
dataType: string
|
||||
lineageTag: 988ab5ef-57bb-4e06-a109-842b11278ab4
|
||||
summarizeBy: none
|
||||
sourceColumn: BU_CODE_AUTH
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_SALES_ORG = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT KCODE,BU_CODE_AUTH from dm.dm_auth_sales_org"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
table DM_AUTH_SALES_PACK
|
||||
lineageTag: 5cfa6fe3-f188-4f94-b670-b8c5ff040d12
|
||||
|
||||
column KCODE
|
||||
dataType: string
|
||||
lineageTag: 23a8a0f5-10d0-4173-bb4d-4b62dda9cc6a
|
||||
summarizeBy: none
|
||||
sourceColumn: KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE
|
||||
dataType: string
|
||||
lineageTag: daba62b7-8458-4c54-b2c8-962144201f4d
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_SALES_PACK = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT KCODE,PACK_SOURCE
|
||||
from dm.dm_auth_sales_pack
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
table DM_AUTH_SALES_TA
|
||||
lineageTag: 06a32249-cbac-411b-b4c0-9993c673282a
|
||||
|
||||
column USER_KCODE
|
||||
dataType: string
|
||||
lineageTag: 7ca247c5-457b-49dd-90e3-745e32a0885c
|
||||
summarizeBy: none
|
||||
sourceColumn: USER_KCODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: d5eb5cc4-ba2f-47b2-acfb-9e1245d01470
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: e4988fcf-d2f0-4c1b-b75b-4ccd93588050
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 80423edc-c0de-49db-87f0-053daad33ace
|
||||
summarizeBy: none
|
||||
sourceColumn: TA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition DM_AUTH_SALES_TA = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_权限表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
WITH
|
||||
TEMP_TABLE AS (
|
||||
SELECT
|
||||
USER_KCODE,
|
||||
TA,
|
||||
DATA_SOURCE,
|
||||
TA_SOURCE
|
||||
FROM
|
||||
dm.dm_auth_sales_ta
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
TEMP_TABLE
|
||||
UNION ALL
|
||||
SELECT
|
||||
USER_KCODE,
|
||||
'ALL' TA,
|
||||
DATA_SOURCE,
|
||||
concat ('ALL', DATA_SOURCE) TA_SOURCE
|
||||
FROM
|
||||
TEMP_TABLE
|
||||
GROUP BY
|
||||
USER_KCODE,
|
||||
DATA_SOURCE
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 06_AuthTable
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
table Dim_BrandDefaultMKT
|
||||
isHidden
|
||||
lineageTag: 26b52edb-c7e8-4c06-ad2a-4320a22967b9
|
||||
|
||||
column BRAND_NAME
|
||||
dataType: string
|
||||
isHidden
|
||||
lineageTag: 4839595c-dc27-4274-9bb9-9e44eb83aee4
|
||||
summarizeBy: none
|
||||
sourceColumn: BRAND_NAME
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
isHidden
|
||||
lineageTag: e6905886-16ef-4d95-a6d8-6e22081dbab9
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
isHidden
|
||||
lineageTag: 5ecb43ae-cd7d-4a5b-b2df-d25ed40fe613
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
isHidden
|
||||
lineageTag: 894eafdd-30e1-4a26-8de5-01d81bb3283d
|
||||
summarizeBy: none
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP
|
||||
dataType: string
|
||||
isHidden
|
||||
lineageTag: c05777c6-1ca6-45cf-9c15-8665d2785d1c
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_FLAG
|
||||
dataType: int64
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 38b2902d-c7f6-4400-9c6f-2951bc9d87c7
|
||||
summarizeBy: sum
|
||||
sourceColumn: MKT_FLAG
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PRD_FLAG
|
||||
dataType: int64
|
||||
isHidden
|
||||
formatString: 0
|
||||
lineageTag: 162b0e6d-a619-485a-8d3d-b69f9d6a807c
|
||||
summarizeBy: sum
|
||||
sourceColumn: PRD_FLAG
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_BrandDefaultMKT = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
BRAND_NAME,
|
||||
A.MARKET,
|
||||
A.DATA_SOURCE,
|
||||
VBP,
|
||||
INT(B.PRD_FLAG) PRD_FLAG,
|
||||
-------------Retail
|
||||
CASE
|
||||
WHEN
|
||||
A.DATA_SOURCE = 'Retail(Quarterly)'
|
||||
AND A.MARKET IN (
|
||||
'Inhaled Extended Market',
|
||||
'NIAD (Non-Insulin Anti-Diabetic) Market',
|
||||
'Rosuvastatin Market',
|
||||
'BUDESONIDE Market',
|
||||
'EGFR TKI Market',
|
||||
'Anti-HER2 Market',
|
||||
'Anti-HER2 mBC Market',
|
||||
'Fasenra Market',
|
||||
'Severe Asthma'
|
||||
)
|
||||
THEN
|
||||
1
|
||||
-------------DTP
|
||||
WHEN
|
||||
A.DATA_SOURCE = 'DTP(Quarterly)'
|
||||
AND A.MARKET IN (
|
||||
'Anti-HER2 Market',
|
||||
'Anti-HER2 mBC Market',
|
||||
'Fasenra/Tezspire Related Market',
|
||||
'Severe Asthma',
|
||||
'Tezspire CRSwNP Market',
|
||||
'CRSwNP Market',
|
||||
'PAM Market'
|
||||
)
|
||||
THEN
|
||||
1
|
||||
ELSE 0
|
||||
END MKT_FLAG
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_BRAND_MARKET A
|
||||
INNER JOIN DM.DM_TD_EXTERNAL_MARKET B
|
||||
ON A.MARKET = B.MARKET
|
||||
AND A.DATA_SOURCE = B.DATA_SOURCE
|
||||
WHERE
|
||||
A.MARKET IS NOT NULL
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
table Dim_BrandMKT
|
||||
lineageTag: ca124965-ac38-4d4a-add3-99afe0bd5da7
|
||||
|
||||
column MKT_PROD = IF([MARKET]<>BLANK() && [IMSBRAND] <> BLANK(), [MARKET]&[IMSBRAND])
|
||||
lineageTag: dfd5d231-c860-4854-b2af-45698eb019a0
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: bfad4b35-6307-4c80-83a0-693e0c852d0d
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBPFLAG
|
||||
dataType: string
|
||||
lineageTag: 9bc6be1f-5edf-41c1-88e8-f0805637fc8b
|
||||
summarizeBy: none
|
||||
sourceColumn: VBPFLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VALUETYPE
|
||||
dataType: string
|
||||
lineageTag: c9072504-ed42-4c4f-b18d-f7d8e791ff68
|
||||
summarizeBy: none
|
||||
sourceColumn: VALUETYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RNK
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 07a6000f-bcf0-4cd3-8628-b2603a7086ed
|
||||
summarizeBy: sum
|
||||
sourceColumn: RNK
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column BRAND_NAME
|
||||
dataType: string
|
||||
lineageTag: eb5f2e01-c553-41e5-94c8-db1d967f245a
|
||||
summarizeBy: none
|
||||
sourceColumn: BRAND_NAME
|
||||
sortByColumn: RNK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: 0b173a2f-fe84-4fe3-8586-add2948af41b
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP
|
||||
dataType: string
|
||||
lineageTag: 41ebd8a3-2713-4504-a528-e7a43b3d19dd
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP
|
||||
dataType: string
|
||||
lineageTag: c7353cb7-3caf-46cd-a5e9-c9c6dcc9bcbc
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TANAME =
|
||||
|
||||
SWITCH(TRUE(),
|
||||
[TA_NAME] = "ONC","ONCO",
|
||||
[TA_NAME])
|
||||
lineageTag: d5416872-ab46-444c-a547-a4f0abdef173
|
||||
summarizeBy: none
|
||||
sortByColumn: TA_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column BRANDGROUP =
|
||||
SWITCH (
|
||||
TRUE ( ),
|
||||
Dim_BrandMKT[Strategicbrand] = "策略品牌", "Strategic brands",
|
||||
Dim_BrandMKT[VBPFLAG] = "VBP" && Dim_BrandMKT[DATA_SOURCE]<>"DTP(Quarterly)", "VBP brands"
|
||||
)
|
||||
lineageTag: 29f7391c-1fbc-4a9f-8ce0-1b589a7a8b8d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DefindMarket = IF([MARKET] = BLANK(),"UnKnow",[MARKET])
|
||||
lineageTag: f24cc562-4f84-4284-b662-3cc1ab45f5e5
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_RN
|
||||
dataType: string
|
||||
lineageTag: 139c6a5b-b42e-4c94-9c57-46c8980d32dc
|
||||
summarizeBy: none
|
||||
sourceColumn: TA_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEYCOMPATITORCN
|
||||
dataType: string
|
||||
lineageTag: 4852b821-da4e-4bc9-961c-55223fed4cab
|
||||
summarizeBy: none
|
||||
sourceColumn: KEYCOMPATITORCN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEYCOMPATITOREN
|
||||
dataType: string
|
||||
lineageTag: 418415ba-44f5-4819-951b-7c7c020aded7
|
||||
summarizeBy: none
|
||||
sourceColumn: KEYCOMPATITOREN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEYCOMPATITORCN2 = IF([CompatitorType] = "PROD_CORP",[KEYCOMPATITORCN]&"("&[CORP]&")",[KEYCOMPATITORCN])
|
||||
lineageTag: 7ea17958-6025-46e9-846f-6359cb7f7cbe
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ValueTypeName = IF([VALUETYPE] = "RMB","Value",[VALUETYPE])
|
||||
lineageTag: 4a4471f0-1afe-4404-bb41-75ce51bba0ad
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 3e65464e-7d26-47ee-ae16-d2cf4c8f190b
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_NAME
|
||||
dataType: string
|
||||
lineageTag: 5a2f2195-95b3-4179-8d69-f3911eba7055
|
||||
summarizeBy: none
|
||||
sourceColumn: TA_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IMSBRAND
|
||||
dataType: string
|
||||
lineageTag: 5cf4a60a-7963-4d7c-b909-e84c272b0732
|
||||
summarizeBy: none
|
||||
sourceColumn: IMSBRAND
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Strategicbrand
|
||||
dataType: string
|
||||
lineageTag: 356bb205-a0ad-4823-8cc6-03c0567fffa8
|
||||
summarizeBy: none
|
||||
sourceColumn: Strategicbrand
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CompatitorMarket
|
||||
dataType: string
|
||||
lineageTag: 6665a376-c4e0-42c8-9f96-8ff087b1398c
|
||||
summarizeBy: none
|
||||
sourceColumn: CompatitorMarket
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CompatitorType
|
||||
dataType: string
|
||||
lineageTag: 15f3c95d-5a08-4abe-8cde-dea8f6f8bdd7
|
||||
summarizeBy: none
|
||||
sourceColumn: CompatitorType
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: 53c626e0-96ea-43b2-aa9a-018bbcf97f50
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column BRAND_NAME_CN
|
||||
dataType: string
|
||||
lineageTag: 210af7c5-9cda-4546-bb49-cd4546831bf9
|
||||
summarizeBy: none
|
||||
sourceColumn: BRAND_NAME_CN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_NAME = [BRAND_NAME_CN] & "(" & [BRAND_NAME]&")"
|
||||
lineageTag: 3296d7cd-be2b-453f-ab0f-5fe1d6535995
|
||||
summarizeBy: none
|
||||
sortByColumn: RNK
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_HIDDEN_COUNTY
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 8a2003c6-a56b-42e8-af70-f41f5e5908b3
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_HIDDEN_COUNTY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Definition
|
||||
dataType: string
|
||||
lineageTag: 2885513c-6cc4-4b7b-8636-b21a05e89dad
|
||||
summarizeBy: none
|
||||
sourceColumn: Definition
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_BrandMKT = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
TA_NAME,
|
||||
RNK,
|
||||
BRAND_NAME,
|
||||
KEYCOMPATITORCN,
|
||||
KEYCOMPATITOREN,
|
||||
CLASS,
|
||||
IMSBRAND,
|
||||
CORP,
|
||||
MARKET,
|
||||
VBP,
|
||||
VBPFLAG,
|
||||
VALUETYPE,
|
||||
Strategicbrand,
|
||||
CompatitorMarket,
|
||||
CompatitorType,
|
||||
TA_RN,
|
||||
DATA_SOURCE,
|
||||
B.PROD_DES_C BRAND_NAME_CN,
|
||||
CASE
|
||||
WHEN TA_NAME = 'ONC' THEN 1
|
||||
WHEN TA_NAME = 'RARE' THEN 2
|
||||
ELSE 0
|
||||
END AS IS_HIDDEN_COUNTY,
|
||||
CONCAT(
|
||||
MARKET,
|
||||
' (',
|
||||
CASE
|
||||
WHEN VALUETYPE = 'RMB' THEN 'Value'
|
||||
ELSE VALUETYPE
|
||||
END,
|
||||
')'
|
||||
) AS Definition
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_BRAND_MARKET A
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
PROD_DES,
|
||||
MAX(PROD_DES_C) PROD_DES_C
|
||||
FROM
|
||||
dm.dm_td_external_packinfo
|
||||
GROUP BY
|
||||
PROD_DES
|
||||
) b ON a.IMSBRAND = b.PROD_DES
|
||||
WHERE
|
||||
DEFAULTFLAG = 1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
更改的类型 = Table.TransformColumnTypes(Source,{{"RNK", Int64.Type}})
|
||||
in
|
||||
更改的类型
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
table Dim_Calendar
|
||||
lineageTag: b54e7974-59f5-4b19-b987-f439b32f640d
|
||||
dataCategory: Time
|
||||
|
||||
column HALF_NUM = INT(RIGHT(Dim_Calendar[HALF_YEAR],1))
|
||||
formatString: 0
|
||||
lineageTag: 23cd5f30-22e6-4b0d-ae42-b8283ff008cd
|
||||
summarizeBy: sum
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_NUM = INT([YEAR])
|
||||
formatString: 0
|
||||
lineageTag: 072cb891-834a-4798-9510-b49c5bec3b50
|
||||
summarizeBy: sum
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YM_CODE = INT([MONTH]+([YEAR]-MIN([YEAR]) )*12)
|
||||
formatString: 0
|
||||
lineageTag: e44afd30-7f11-4453-ade5-d4f19792c089
|
||||
summarizeBy: sum
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YM_NUM = INT([YYYYMM])
|
||||
formatString: 0
|
||||
lineageTag: 8b09c68a-f88b-444b-becb-789d281736ec
|
||||
summarizeBy: sum
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL
|
||||
dataType: string
|
||||
lineageTag: 20d7f126-cc9b-40ad-a051-db896eeacc9d
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM_EXTERNAL
|
||||
sortByColumn: YM_NUM
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MONTH_EXTERNAL
|
||||
dataType: string
|
||||
lineageTag: 1d96877e-9f1c-4282-89d0-15720cd10aec
|
||||
summarizeBy: none
|
||||
sourceColumn: MONTH_EXTERNAL
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_EXTERNAL
|
||||
dataType: string
|
||||
isHidden
|
||||
lineageTag: 7d463077-4dce-4d2d-a37a-c633f67ff3c2
|
||||
summarizeBy: none
|
||||
sourceColumn: YEAR_EXTERNAL
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATE
|
||||
dataType: dateTime
|
||||
isKey
|
||||
formatString: Short Date
|
||||
lineageTag: 2fa17c71-627f-4948-8456-e2f36e74e45d
|
||||
summarizeBy: none
|
||||
sourceColumn: DATE
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation UnderlyingDateTimeDataType = Date
|
||||
|
||||
column YYYYMMDD
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 392d840e-917d-4cc3-9017-70b0b9b4708e
|
||||
summarizeBy: sum
|
||||
sourceColumn: YYYYMMDD
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM
|
||||
dataType: string
|
||||
lineageTag: 6e1aa163-03e8-4606-a3be-e2549dd65d01
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 0676a2b5-d28f-4d1c-bd39-dca4d7ef51a1
|
||||
summarizeBy: none
|
||||
sourceColumn: YEAR
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column QUARTER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 63a22fdb-0673-4f36-ba35-581c274a7565
|
||||
summarizeBy: sum
|
||||
sourceColumn: QUARTER
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MONTH
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 09f91cdf-978e-44c9-b4cd-cb13f6c3fe6f
|
||||
summarizeBy: sum
|
||||
sourceColumn: MONTH
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_QUATER
|
||||
dataType: string
|
||||
lineageTag: b9b9a662-2ddf-4d9f-a26c-3bf11ba48b9c
|
||||
summarizeBy: none
|
||||
sourceColumn: YEAR_QUATER
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HALF_YEAR
|
||||
dataType: string
|
||||
lineageTag: 47ff60e4-3dfe-4808-8a37-4f2cbdb1260f
|
||||
summarizeBy: none
|
||||
sourceColumn: HALF_YEAR
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_FLAG
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: bb295807-30d2-423e-9f54-5360e72bf5de
|
||||
summarizeBy: sum
|
||||
sourceColumn: YEAR_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HasData_AIA =
|
||||
|
||||
VAR _end = [YM_HasData_AIA]
|
||||
VAR _start =
|
||||
( INT ( LEFT ( _end, 4 ) ) - 1 ) & "01"
|
||||
RETURN
|
||||
IF ( [YYYYMM] >= _start && [YYYYMM] <= _end, 1, 0 )
|
||||
/*
|
||||
用于AIA Dashboard的年月筛选。AIA只展示两年数据
|
||||
*/
|
||||
formatString: 0
|
||||
lineageTag: 28ea1db3-35a3-4be5-a6c9-30999ccd9232
|
||||
summarizeBy: sum
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL_AIA
|
||||
dataType: string
|
||||
lineageTag: 3d2b5b4e-57fd-496e-adf6-16b066dd8908
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM_EXTERNAL_AIA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YMFlag
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: d931bc3e-12fd-48a5-b8eb-4cdc70b330e9
|
||||
summarizeBy: sum
|
||||
sourceColumn: YMFlag
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL_NIAD
|
||||
dataType: string
|
||||
lineageTag: 88151a6a-478f-4e3c-b695-f883de343921
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM_EXTERNAL_NIAD
|
||||
sortByColumn: YYYYMM
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YM_FLAG_NIAD = [YYYYMM] <=CALCULATE(MAX(Dim_Calendar[YYYYMM]) ,FILTER(Dim_Calendar,[YYYYMM_EXTERNAL_NIAD]="R") )
|
||||
formatString: """TRUE"";""TRUE"";""FALSE"""
|
||||
lineageTag: 53a955f6-866f-4b60-975e-00a783124be5
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_MERGED_DATA
|
||||
dataType: string
|
||||
lineageTag: 88738c1c-2938-4680-990a-f8027ddab764
|
||||
summarizeBy: none
|
||||
sourceColumn: YYYYMM_MERGED_DATA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Calendar-59b630e2-4e38-43bf-981e-a88809964372 = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
`DATE`,
|
||||
YYYYMMDD,
|
||||
YYYYMM,
|
||||
YEAR,
|
||||
QUARTER,
|
||||
MONTH,
|
||||
YEAR_QUATER,
|
||||
HALF_YEAR,
|
||||
YYYYMM_EXTERNAL,
|
||||
MONTH_EXTERNAL,
|
||||
YEAR_EXTERNAL,
|
||||
CASE WHEN YEAR >= (
|
||||
SELECT
|
||||
MAX(YEAR) -2 YEAR
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_CALENDAR
|
||||
) THEN 1
|
||||
ELSE 0
|
||||
END YEAR_FLAG,
|
||||
YYYYMM_EXTERNAL_AIA,
|
||||
IF(A.YYYYMM<=B.YM,1,0 ) YMFlag
|
||||
,YYYYMM_EXTERNAL_NIAD
|
||||
,YYYYMM_MERGED_DATA
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_CALENDAR A
|
||||
LEFT JOIN
|
||||
(SELECT MAX(YYYYMM) AS YM
|
||||
FROM DM.DM_TD_EXTERNAL_CALENDAR
|
||||
WHERE YYYYMM_EXTERNAL = 'R') AS B
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
更改的类型 = Table.TransformColumnTypes(Source,{{"YYYYMM", type text}})
|
||||
in
|
||||
更改的类型
|
||||
```
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
table Dim_Calendar_Alt
|
||||
lineageTag: 04ca5752-6af2-499e-a232-42b4b5a62c79
|
||||
|
||||
column HALF_NUM
|
||||
formatString: 0
|
||||
lineageTag: 42e1294e-d76b-4295-91fc-843bc6acf016
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[HALF_NUM]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_NUM
|
||||
formatString: 0
|
||||
lineageTag: fa123f02-f359-4c86-a31e-4db38ab0eafd
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YEAR_NUM]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YM_CODE
|
||||
lineageTag: 69e2ccfa-4791-4c86-be34-4b4c3fdceca0
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YM_CODE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column YM_NUM
|
||||
formatString: 0
|
||||
lineageTag: 6d0b2134-4ad8-447e-8905-825bb79d61cb
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YM_NUM]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL
|
||||
lineageTag: 67d94e51-ef7d-43b2-be04-e869a7688f72
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMM_EXTERNAL]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MONTH_EXTERNAL
|
||||
lineageTag: 0751e657-a882-40dd-b9c7-49e8dc04ced1
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[MONTH_EXTERNAL]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_EXTERNAL
|
||||
lineageTag: d5dfc57d-6b84-4664-bf1c-4d281f20cda3
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YEAR_EXTERNAL]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATE
|
||||
formatString: General Date
|
||||
lineageTag: af9df95b-15cb-4e82-9390-0a12270f1a6f
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[DATE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMMDD
|
||||
formatString: 0
|
||||
lineageTag: 2207d015-ca60-4b93-844b-b1fc3f00688c
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMMDD]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM
|
||||
lineageTag: d1335fba-d447-477b-ac4e-75c0b766b8b7
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMM]
|
||||
sortByColumn: YM_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR
|
||||
formatString: 0
|
||||
lineageTag: 19314e47-cddf-48c7-a127-77d254165424
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YEAR]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column QUARTER
|
||||
formatString: 0
|
||||
lineageTag: 40c808c9-cbe9-440d-8f58-bccb74a59a3f
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[QUARTER]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MONTH
|
||||
formatString: 0
|
||||
lineageTag: 55aa17ba-84d5-42ec-a8cc-5fa9f5341820
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[MONTH]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_QUATER
|
||||
lineageTag: ca3016cf-158f-4eb3-9603-4a9edee23632
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YEAR_QUATER]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HALF_YEAR
|
||||
lineageTag: 8483adc0-c4e2-4430-b745-4fe0587ebd33
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[HALF_YEAR]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YEAR_FLAG
|
||||
formatString: 0
|
||||
lineageTag: 3248d135-56d6-4a13-a0ae-18e310b7ee8d
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YEAR_FLAG]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HasData_AIA
|
||||
formatString: 0
|
||||
lineageTag: d91ed9d4-8636-4e0e-9d9d-63ea67ed0bca
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[HasData_AIA]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL_AIA
|
||||
lineageTag: 9a658880-79f1-4b7a-af50-10f383d01c94
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMM_EXTERNAL_AIA]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YMFlag
|
||||
formatString: 0
|
||||
lineageTag: 12a0eeee-1774-47da-a7a4-1e6c7789716b
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YMFlag]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_EXTERNAL_NIAD
|
||||
lineageTag: c17c3076-6547-4cb4-8705-bdc064887326
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMM_EXTERNAL_NIAD]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YM_FLAG_NIAD
|
||||
formatString: """TRUE"";""TRUE"";""FALSE"""
|
||||
lineageTag: a8d442a8-fc64-4df6-80f0-7ec39d85ea80
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YM_FLAG_NIAD]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column YYYYMM_MERGED_DATA
|
||||
lineageTag: 7046cd97-b6d3-48c1-8e35-44df9a4995fa
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_Calendar[YYYYMM_MERGED_DATA]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Calendar_Alt = calculated
|
||||
mode: import
|
||||
source = Dim_Calendar
|
||||
|
||||
annotation PBI_Id = c208fcb5de4943c0972914b548c770c4
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
table Dim_Class
|
||||
lineageTag: 5c9e5bd8-bf81-4518-85df-5ca516d61579
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: e9d468f0-e287-44df-9653-c1386fd9c679
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 01aa8f62-31ef-4a96-a9e6-3cf8b67d614d
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS_RN
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: a626486b-2a89-4dd2-a496-254ed0597b98
|
||||
summarizeBy: sum
|
||||
sourceColumn: CLASS_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS_SOURCE = [MARKET] & [CLASS] & [DATA_SOURCE]
|
||||
lineageTag: dd285249-6792-46a7-bfc1-8155f901672c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 07163740-aaea-4591-9668-7b6628348d25
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Class = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT MARKET,
|
||||
CASE
|
||||
WHEN NVL(A.CLASS, '') = ''
|
||||
OR A.CLASS = 'Others' THEN '-'
|
||||
ELSE UPPER(A.CLASS)
|
||||
END CLASS,
|
||||
A.DATA_SOURCE,
|
||||
NVL(PN.RN, 99) CLASS_RN
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_MARKET_PACK_MAPPING A
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
CLASS,
|
||||
row_number() OVER(
|
||||
PARTITION BY 1
|
||||
ORDER BY
|
||||
(
|
||||
CASE
|
||||
WHEN CLASS = '-' THEN 0
|
||||
ELSE SALES_VALUE_CAL
|
||||
END
|
||||
) DESC
|
||||
) RN
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
UPPER(
|
||||
CASE
|
||||
WHEN NVL(CLASS, '') = ''
|
||||
OR CLASS = 'Others' THEN '-'
|
||||
ELSE UPPER(CLASS)
|
||||
END
|
||||
) CLASS,
|
||||
SUM(B.SALES_VALUE_CAL) SALES_VALUE_CAL
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_MARKET_PACK_MAPPING A
|
||||
INNER JOIN DM.DM_TF_EXTERNAL_SALES B ON A.PACK_COD = B.PACK_COD
|
||||
AND A.DATA_SOURCE = B.DATA_SOURCE
|
||||
and a.new_code = b.new_code
|
||||
WHERE
|
||||
B.YYYYMM >= (
|
||||
SELECT
|
||||
LEFT(MAX(YYYYMM), 4) * 100 + 1
|
||||
FROM
|
||||
DM.DM_TF_EXTERNAL_SALES
|
||||
WHERE
|
||||
DATA_SOURCE = 'IQVIA-CHPA(Monthly)'
|
||||
)
|
||||
AND B.DATA_SOURCE = 'IQVIA-CHPA(Monthly)'
|
||||
GROUP BY
|
||||
CASE
|
||||
WHEN NVL(CLASS, '') = ''
|
||||
OR CLASS = 'Others' THEN '-'
|
||||
ELSE UPPER(CLASS)
|
||||
END
|
||||
) T
|
||||
) PN ON UPPER(
|
||||
CASE
|
||||
WHEN NVL(A.CLASS, '') = ''
|
||||
OR A.CLASS = 'Others' THEN '-'
|
||||
ELSE UPPER(A.CLASS)
|
||||
END
|
||||
) = PN.CLASS
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
table Dim_CoreDept
|
||||
lineageTag: 440f02af-03a6-4cd9-b5ab-4b46774f48a9
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 905bfb8f-c212-4b43-a717-c4e8ef0c2191
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DEPT_NAME
|
||||
dataType: string
|
||||
lineageTag: 1f4247bf-4cb9-42af-91e4-2dbfcc8c1194
|
||||
summarizeBy: none
|
||||
sourceColumn: DEPT_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORE_DEPT
|
||||
dataType: string
|
||||
lineageTag: 89a98a8a-8aee-4498-8884-0e2b4eee4956
|
||||
summarizeBy: none
|
||||
sourceColumn: CORE_DEPT
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 45dc7c30-3cbd-468c-bffc-fc624de536bb
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DEPT_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 482d6796-7c5b-46b7-b390-581ac032513d
|
||||
summarizeBy: none
|
||||
sourceColumn: DEPT_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 46c2fc66-9b48-45c1-89a6-3636dd6cee6f
|
||||
summarizeBy: none
|
||||
sourceColumn: MKT_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_CoreDept = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT
|
||||
t1.MARKET,
|
||||
t1.DEPT_NAME,
|
||||
CASE
|
||||
WHEN t2.CORE_DEPT IS NULL THEN ''
|
||||
ELSE t2.CORE_DEPT
|
||||
END AS CORE_DEPT,
|
||||
t1.DATA_SOURCE,
|
||||
concat (t1.DEPT_NAME, t1.DATA_SOURCE) DEPT_SOURCE,
|
||||
concat (t1.MARKET, t1.DATA_SOURCE) MKT_SOURCE
|
||||
FROM
|
||||
dm.DM_TF_EXT_UNIONALL_SALES_MAPPING T1
|
||||
LEFT JOIN DM.dm_td_xiehe_core_dept T2 ON T1.MARKET = T2.MARKET
|
||||
AND T1.DATA_SOURCE = T2.DATA_SOURCE"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
table Dim_Corp
|
||||
lineageTag: 188bce16-d07d-4b39-946b-b744c9a78bf3
|
||||
|
||||
column CORP_COD
|
||||
dataType: string
|
||||
sourceProviderType: nchar
|
||||
lineageTag: cc9ce6bd-c940-469e-899c-2ac11d7b62fb
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_TYPE
|
||||
dataType: string
|
||||
sourceProviderType: nchar
|
||||
lineageTag: fbd88fb0-b4ba-44d5-92d8-beddadf2e7b4
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_DES_C
|
||||
dataType: string
|
||||
lineageTag: 917c4a86-654a-485e-bb8f-423a70f115ab
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_CODE_DESC = [CORP_DES] & " - " & [CORP_DES_C]
|
||||
lineageTag: 188c86ff-597d-4bd0-8ea5-effe3209512e
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_DES
|
||||
dataType: string
|
||||
lineageTag: 36dab707-cfe7-4e9f-9ed0-b0a175e2b2f1
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Corp-03c3b439-239a-498f-9dbe-fce901039f87 = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT CORP_COD,CORP_DES,UPPER(A.CORP_DES_C) CORP_DES_C,CORP_TYPE
|
||||
FROM DM.DM_TD_EXTERNAL_CORP A
|
||||
WHERE CORP_COD <> '' "
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
table Dim_CorpType
|
||||
lineageTag: 765d61e6-451d-4b8e-8c67-4e7014f90b2a
|
||||
|
||||
column Value1
|
||||
lineageTag: c327a6cb-208a-4ef5-9d39-69b07f327ecc
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: [Value1]
|
||||
sortByColumn: Value2
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Value2
|
||||
formatString: 0
|
||||
lineageTag: 4ceee4f1-6bd8-4dc1-96fe-c6b217b82199
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: [Value2]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_CorpType = calculated
|
||||
mode: import
|
||||
source = {("AZ",4),("MNC",2),("LOCAL",3),("TOTAL",1)}
|
||||
|
||||
annotation PBI_Id = 42077e12771a48168ad0c5a89a80694b
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
table Dim_DataSource
|
||||
lineageTag: 8a47e04a-d7ca-4a96-bf05-10c9cff59288
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: cbc31421-3151-4fb1-87c1-8ff4626a63a5
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
sortByColumn: ORDER1
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ORDER1
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: b11792fd-8b55-41d8-bce7-024c58c084ce
|
||||
summarizeBy: sum
|
||||
sourceColumn: ORDER1
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_TYPE
|
||||
dataType: string
|
||||
lineageTag: 56b97f0b-988f-465f-9545-b1b2177d8dac
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SOURCENAME
|
||||
dataType: string
|
||||
lineageTag: 7991ee21-3e7c-4462-a8e7-db3f3a5a1191
|
||||
summarizeBy: none
|
||||
sourceColumn: SOURCENAME
|
||||
sortByColumn: ORDER1
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_DataSource = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source =
|
||||
let
|
||||
源 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8gwM83TUdfYIcNTwzc8rycip1FTSUYIygSxDIAbJKsXqwBX7h/qFRGoEliYWlaQWQTTAOUC2EUhLfmleSSVYU1BqSWJmDm7lxkAMUQNWHuLhjFutGRADFYAVOuNTaAp2NkShqzN2r5kDsStESYSHgktiSSJu8yyA+PnyiU/XLXm6o+npnF1gXY6eOALNEoiBkmBFLiEBqMYilJkAMVBaKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DATA_SOURCE = _t, DATA_TYPE = _t, ORDER1 = _t, SOURCENAME = _t]),
|
||||
更改的类型1 = Table.TransformColumnTypes(源,{{"ORDER1", Int64.Type}})
|
||||
in
|
||||
更改的类型1
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
table Dim_DataSource_ForRLS
|
||||
lineageTag: 8a0dec48-e4ca-410e-bfb9-022ad263205c
|
||||
|
||||
column DATA_SOURCE
|
||||
lineageTag: afe02f4f-642c-4a0c-975a-53a353462748
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_DataSource[DATA_SOURCE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ORDER1
|
||||
formatString: 0
|
||||
lineageTag: 83537aae-4211-4070-aac7-84633fb1bda2
|
||||
summarizeBy: sum
|
||||
isNameInferred
|
||||
sourceColumn: Dim_DataSource[ORDER1]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_TYPE
|
||||
lineageTag: f4a1f8af-ee4a-4516-8e9d-d79cedd80f6e
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_DataSource[DATA_TYPE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SOURCENAME
|
||||
lineageTag: d286928a-8856-4c51-b31f-90773140b24e
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_DataSource[SOURCENAME]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_DataSource_ForRLS = calculated
|
||||
mode: import
|
||||
source = Dim_DataSource
|
||||
|
||||
annotation PBI_Id = c10c90705efe4bcf8d8198f4577aa10c
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
table Dim_Dept
|
||||
lineageTag: d4fade06-0fa3-4c36-ac23-2abf52ad9f5e
|
||||
|
||||
column DEPT_NAME
|
||||
dataType: string
|
||||
lineageTag: d73d87c6-4eef-45ea-b013-ee396bb7b5ed
|
||||
summarizeBy: none
|
||||
sourceColumn: DEPT_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: ea490b69-5de4-4985-9a3e-0b4cb447bfd5
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DEPT_SOURCE = [DEPT_NAME]&[DATA_SOURCE]
|
||||
lineageTag: 20a6b85e-d31c-4e2d-a454-1a0b73e353a1
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column prescription_dept_lv1
|
||||
dataType: string
|
||||
lineageTag: a433685d-d351-4139-a84a-6621057e1883
|
||||
summarizeBy: none
|
||||
sourceColumn: prescription_dept_lv1
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column prescription_dept_lv2
|
||||
dataType: string
|
||||
lineageTag: a873b392-fafb-41e7-b115-e99decf5d20c
|
||||
summarizeBy: none
|
||||
sourceColumn: prescription_dept_lv2
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Dept = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select distinct
|
||||
prescription_dept_lv1
|
||||
,prescription_dept_lv2
|
||||
,prescription_dept_lv3 DEPT_NAME
|
||||
,'XH Data(Quarterly)' DATA_SOURCE
|
||||
from dm.dm_ext_xiehe_sales"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
table Dim_ExchangRate
|
||||
lineageTag: 28c822f8-f28b-494a-a029-c624801f9e53
|
||||
|
||||
column exchange_rate
|
||||
dataType: double
|
||||
lineageTag: 88ba2c6a-5bd9-4af9-8ad1-55c1518ad1e6
|
||||
summarizeBy: sum
|
||||
sourceColumn: exchange_rate
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
partition Dim_ExchangRate-1c15d44e-e1b5-4a53-aa22-9e064785b44d = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_辅助表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"select exchange_rate FROM DM.DM_TD_EXTERNAL_EXCHANGERATE"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
table Dim_Geo
|
||||
lineageTag: aeec8d5d-c86c-4957-8592-3a153f08c3a8
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: b8553d0a-9333-4148-a504-45df64984c85
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_COD
|
||||
dataType: string
|
||||
lineageTag: c4d4ba83-b9a7-4bf2-b7c1-52b72a5e8c64
|
||||
summarizeBy: none
|
||||
sourceColumn: AUDIT_COD
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_KEY = [AUDIT_COD] & [DATA_SOURCE] & [REGION_TYPE]
|
||||
lineageTag: ad7b8a85-bcee-4e83-b855-5bba9eca0cb8
|
||||
summarizeBy: none
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column REGION_TYPE
|
||||
dataType: string
|
||||
lineageTag: 8d11b6b5-f0ee-4989-b43e-9cc3d871feec
|
||||
summarizeBy: none
|
||||
sourceColumn: REGION_TYPE
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_C
|
||||
dataType: string
|
||||
lineageTag: faea721c-723e-4a6f-a8fd-466367b20c59
|
||||
summarizeBy: none
|
||||
sourceColumn: PROVINCE_C
|
||||
sortByColumn: PROV_RN
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CITY_C
|
||||
dataType: string
|
||||
lineageTag: 9ac48675-dc7e-4c17-bdee-b9b01c0ceda0
|
||||
summarizeBy: none
|
||||
sourceColumn: CITY_C
|
||||
sortByColumn: CITY_RN
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AZ_CITY_TIER
|
||||
dataType: string
|
||||
lineageTag: 4d853518-7ca3-4779-9fca-0a58ac0a90dd
|
||||
summarizeBy: none
|
||||
sourceColumn: AZ_CITY_TIER
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_SOURCE = [AUDIT_COD] & [DATA_SOURCE]
|
||||
lineageTag: 09d9f35d-ec00-41e2-9f74-a9fb396745e8
|
||||
summarizeBy: none
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROV_RN
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: b670be6c-3c55-47a6-a72d-273bc9d279d2
|
||||
summarizeBy: sum
|
||||
sourceColumn: PROV_RN
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CITY_RN
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 8358fef1-3938-4aa7-a597-3862284f3926
|
||||
summarizeBy: sum
|
||||
sourceColumn: CITY_RN
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_MAP
|
||||
dataType: string
|
||||
lineageTag: 2f1e99c3-ddee-4ee7-9096-f2b311ba56a8
|
||||
summarizeBy: none
|
||||
sourceColumn: PROVINCE_MAP
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column COUNTY_NAME
|
||||
dataType: string
|
||||
lineageTag: 31fb4942-21e7-4cbc-9f0f-1040ba2a27cb
|
||||
summarizeBy: none
|
||||
sourceColumn: COUNTY_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column COUNTY_TIER
|
||||
dataType: string
|
||||
lineageTag: 145266b5-5d87-4d57-ba70-385745a0d25b
|
||||
summarizeBy: none
|
||||
sourceColumn: COUNTY_TIER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PMT_REGION
|
||||
dataType: string
|
||||
lineageTag: afc28c11-8f63-4a52-bd3c-c9b568b1071e
|
||||
summarizeBy: none
|
||||
sourceColumn: PMT_REGION
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_EN
|
||||
dataType: string
|
||||
lineageTag: 0de2113a-757f-47ee-8d37-e43a1fce5826
|
||||
summarizeBy: none
|
||||
sourceColumn: PROVINCE_EN
|
||||
sortByColumn: PROV_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CITY_EN
|
||||
dataType: string
|
||||
lineageTag: 0f11f025-1ad5-4772-af6c-9ae5c2e77edb
|
||||
summarizeBy: none
|
||||
sourceColumn: CITY_EN
|
||||
sortByColumn: CITY_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MERGED_DATA_CITY_C
|
||||
dataType: string
|
||||
lineageTag: 36ca5465-718a-48cc-b58e-8c5b18887fc6
|
||||
summarizeBy: none
|
||||
sourceColumn: MERGED_DATA_CITY_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Geo = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
WITH external_geo AS (
|
||||
SELECT
|
||||
DISTINCT DATA_SOURCE,
|
||||
AUDIT_COD,
|
||||
REGION_TYPE,
|
||||
PROVINCE_C,
|
||||
CITY_C,
|
||||
AZ_CITY_TIER,
|
||||
PROV_RN,
|
||||
CITY_RN,
|
||||
PROVINCE_MAP,
|
||||
COUNTY_NAME,
|
||||
COUNTY_TIER,
|
||||
PMT_REGION
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_GEO
|
||||
),
|
||||
province_en AS (
|
||||
SELECT
|
||||
province_name,
|
||||
province_name_en
|
||||
FROM
|
||||
dm.dm_td_geography
|
||||
WHERE
|
||||
province_name <> ''
|
||||
and province_name is not null
|
||||
GROUP BY 1,2
|
||||
),
|
||||
city_en AS (
|
||||
SELECT
|
||||
city_name,
|
||||
city_name_en
|
||||
FROM
|
||||
dm.dm_td_geography
|
||||
WHERE
|
||||
city_name <> ''
|
||||
and city_name is not null
|
||||
GROUP BY 1,2
|
||||
)
|
||||
SELECT
|
||||
a.DATA_SOURCE,
|
||||
a.AUDIT_COD,
|
||||
a.REGION_TYPE,
|
||||
a.PROVINCE_C,
|
||||
case
|
||||
when a.PROVINCE_C = 'ROC' THEN 'ROC'
|
||||
WHEN a.PROVINCE_C = '全国' then 'National'
|
||||
ELSE prov.province_name_en
|
||||
END as PROVINCE_EN,
|
||||
nvl(city_shi.city_name,a.CITY_C) CITY_C,
|
||||
nvl(city_shi.city_name,a.CITY_C) MERGED_DATA_CITY_C,
|
||||
case
|
||||
when a.CITY_C = 'ROC' THEN 'ROC'
|
||||
WHEN a.CITY_C = '全国' then 'National'
|
||||
WHEN a.CITY_C = '苏锡' THEN 'Suxichang'
|
||||
WHEN a.PROVINCE_C = a.CITY_C then prov.province_name_en
|
||||
WHEN city.city_name is null THEN city_shi.city_name_en
|
||||
ELSE city.city_name_en
|
||||
END as CITY_EN,
|
||||
a.AZ_CITY_TIER,
|
||||
a.PROV_RN,
|
||||
a.CITY_RN,
|
||||
a.PROVINCE_MAP,
|
||||
a.COUNTY_NAME,
|
||||
a.COUNTY_TIER,
|
||||
a.PMT_REGION
|
||||
FROM
|
||||
external_geo a
|
||||
LEFT JOIN province_en prov ON a.PROVINCE_C = prov.province_name
|
||||
LEFT JOIN city_en city ON a.CITY_C = city.city_name
|
||||
LEFT JOIN city_en city_shi on concat(a.CITY_C, '市') = city_shi.city_name
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
changedProperty = IsHidden
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
table Dim_GeoGroup
|
||||
lineageTag: b0650c83-b6b6-4e47-aff7-91053ebfefae
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 4bd7bbe4-8d90-40a0-85dd-c25eca8496f6
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_COD
|
||||
dataType: string
|
||||
lineageTag: ef1755e6-4ba1-4a2d-9a90-ce608340a7c5
|
||||
summarizeBy: none
|
||||
sourceColumn: AUDIT_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_KEY = [AUDIT_COD] & [DATA_SOURCE] & [REGION_TYPE]
|
||||
lineageTag: eac394c1-b39e-49bb-ac03-ac7f4235fb01
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_SOURCE = [AUDIT_COD] & [DATA_SOURCE]
|
||||
lineageTag: bcc144de-3934-4946-9e7a-4a2fa9b8e514
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column REGION_TYPE
|
||||
dataType: string
|
||||
lineageTag: 4b8ad755-ddb2-46c0-8c46-6b7b5b417976
|
||||
summarizeBy: none
|
||||
sourceColumn: REGION_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_GROUP
|
||||
dataType: string
|
||||
lineageTag: b776d17b-0b38-4867-8c72-7c8d76864965
|
||||
summarizeBy: none
|
||||
sourceColumn: PROVINCE_GROUP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_GROUP_NEW =
|
||||
|
||||
IF (
|
||||
[DATA_SOURCE] = "IQVIA-COUNTY(Quarterly)",
|
||||
SWITCH (
|
||||
[PROVINCE_GROUP],
|
||||
"BBU_BU_COUNTY", "BBU_BU_COUNTY",
|
||||
"BBU County", "BBU County",
|
||||
"County"
|
||||
),
|
||||
LOOKUPVALUE (
|
||||
Dim_DataSource[SOURCENAME],
|
||||
Dim_DataSource[DATA_SOURCE], [DATA_SOURCE]
|
||||
)
|
||||
)
|
||||
/*
|
||||
只5.2页面使用
|
||||
*/
|
||||
lineageTag: d25c0017-c69d-4f03-9ef3-36fadb99c309
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_GROUP_EN = SWITCH([PROVINCE_GROUP],"全国","National",[PROVINCE_GROUP])
|
||||
lineageTag: 4ac40fff-7191-4cfa-9c29-d2c9d8645571
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVINCE_GROUP_CATAGORY
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: f7d1d4c5-e998-4b63-a952-2cfd7fcd4515
|
||||
summarizeBy: sum
|
||||
sourceColumn: PROVINCE_GROUP_CATAGORY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_GeoGroup = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
DISTINCT DATA_SOURCE,
|
||||
AUDIT_COD,
|
||||
REGION_TYPE,
|
||||
PROVINCE_GROUP,
|
||||
CASE WHEN PROVINCE_GROUP = 'BBU County' OR PROVINCE_GROUP = 'BBU_BU_COUNTY' THEN 1
|
||||
WHEN PROVINCE_GROUP = 'OBU East5' OR PROVINCE_GROUP = 'OBU NonEast5' THEN 2
|
||||
WHEN PROVINCE_GROUP = '全国' THEN 3
|
||||
ELSE 4 END AS PROVINCE_GROUP_CATAGORY
|
||||
FROM
|
||||
DM.dm_td_external_geo_type
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
table Dim_GeoKey
|
||||
lineageTag: 88fbe5ba-558f-4580-8d08-19e6a3e5be6a
|
||||
|
||||
column AUDIT_SOURCE
|
||||
lineageTag: 70214f94-e6cf-42ed-80f3-4d90f51588f3
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_RC[AUDIT_SOURCE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_GeoKey = calculated
|
||||
mode: import
|
||||
source = DISTINCT(Dim_RC[AUDIT_SOURCE])
|
||||
|
||||
annotation PBI_Id = 86411658aeeb4838a49e4a392e70c67c
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
table Dim_HPFlag
|
||||
lineageTag: e281e266-d03f-45f7-9f2f-9ff74984c501
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 0d3fbc8e-247e-4883-92be-032ddd598960
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_HP_FLAG
|
||||
dataType: string
|
||||
lineageTag: f012cea6-2199-40c3-98b8-aa2c6a1ca94c
|
||||
summarizeBy: none
|
||||
sourceColumn: AIA_HP_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HP_SOURCE = [AIA_HP_FLAG] & [DATA_SOURCE]
|
||||
lineageTag: 6c0d0a97-6af0-4dae-8bcc-6a8e097d1651
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_HPFlag = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT NVL(B.AIA_HP_FLAG, '') AIA_HP_FLAG, A.DATA_SOURCE
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
LEFT JOIN dm.dm_aia_hp_flag B
|
||||
ON A.DATA_SOURCE = B.DATA_SOURCE AND A.inst_code = B.inst_code
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
table Dim_HPFlag_AIASpecial
|
||||
lineageTag: dee1f54b-e7f5-4b88-abba-15f3a6c3ab4d
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 25974d48-ebd7-499c-a67b-2ba737df6312
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_HP_FLAG
|
||||
dataType: string
|
||||
lineageTag: 295809d7-f93b-4b81-9e16-3bfb66ff1c98
|
||||
summarizeBy: none
|
||||
sourceColumn: AIA_HP_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HP_SOURCE = [HP_KEY] & [DATA_SOURCE]
|
||||
lineageTag: e32b8d1f-1b77-4f6a-b063-1255fe72fa97
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column HP_KEY
|
||||
dataType: string
|
||||
lineageTag: 14a208cb-ff36-4993-a882-7e216ac0f307
|
||||
summarizeBy: none
|
||||
sourceColumn: HP_KEY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_HPFlag_AIASpecial = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT A.DATA_SOURCE,B.AIA_HP_FLAG ,CASE WHEN A.DATA_SOURCE = 'AIA(Monthly)' THEN B.AIA_HP_FLAG ELSE '' END HP_KEY
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
INNER JOIN (SELECT DISTINCT AIA_HP_FLAG FROM DM.dm_aia_hp_flag WHERE NVL(AIA_HP_FLAG,'') <> '') B
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
table Dim_HP_Level
|
||||
lineageTag: 71c4ab4e-f05f-473c-a53c-66539329b6ce
|
||||
|
||||
column H_LEVEL
|
||||
dataType: double
|
||||
lineageTag: c0604c1d-0370-44f3-bebf-99294286f4de
|
||||
summarizeBy: sum
|
||||
sourceColumn: H_LEVEL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 8b442707-0662-49fd-997e-a0aedcf47138
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_HP_Level = m
|
||||
mode: import
|
||||
queryGroup: Dim
|
||||
source = ```
|
||||
let
|
||||
Source = Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress,
|
||||
HttpPath,
|
||||
[
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,
|
||||
EnableQueryResultDownload = "0"
|
||||
]
|
||||
){[Name = CatalogName, Kind = "Database"]}[Data],
|
||||
"
|
||||
SELECT DISTINCT
|
||||
ROUND(A.H_LEVEL, 0) H_LEVEL,
|
||||
A.DATA_SOURCE
|
||||
FROM
|
||||
DM.DM_TF_EXTERNAL_SALES A
|
||||
" & UsingLimit,
|
||||
null,
|
||||
[EnableFolding = true]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
table Dim_HP_Potential_AIA
|
||||
lineageTag: 7cdaf160-044f-47b1-ab65-9b02711bc251
|
||||
|
||||
column INST_CODE
|
||||
dataType: string
|
||||
lineageTag: 1593b925-1c0e-41b7-b823-0a5fa0ea8581
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: bce6806b-92d5-4fea-a487-1555a2c4a2b6
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_COD
|
||||
dataType: string
|
||||
lineageTag: 1eedd830-ebc1-4288-906c-f16cb73010f4
|
||||
summarizeBy: none
|
||||
sourceColumn: AUDIT_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_SOURCE = ```
|
||||
[INST_CODE] & [DATA_SOURCE]
|
||||
```
|
||||
lineageTag: 99832462-da4e-4cef-9ffd-bf5bf56897db
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INS_MKT_SOURCE = IF([DATA_SOURCE] = "AIA(Monthly)", [AUDIT_COD] & [MARKET] & [DATA_SOURCE], [DATA_SOURCE])
|
||||
lineageTag: ef9b9249-e3ec-4023-b3a1-540a604aa356
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_DEFAULT_MKT_FLAG =
|
||||
|
||||
|
||||
VAR flag = IF (Dim_HP_Potential_AIA[IS_DEFAULT_POTENTIAL_MKT] = "1" && Dim_HP_Potential_AIA[IS_DEFAULT_POTENTIAL_TYPE] = "1",
|
||||
"Default",
|
||||
"")
|
||||
RETURN flag
|
||||
lineageTag: 5c311ed7-92c9-4fab-bd89-0d0d68cddaba
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_DEFAULT_TYPE_FLAG =
|
||||
|
||||
IF([IS_DEFAULT_POTENTIAL_TYPE] = "1" , "Default")
|
||||
lineageTag: 15ed6338-cf5d-4899-bf68-d1d00c17de9e
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = ```
|
||||
[MARKET] & [DATA_SOURCE]
|
||||
```
|
||||
lineageTag: 2771c8b9-ecbe-454d-b220-1245c50933d6
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: c0acf484-8b6b-4383-8c92-cf788ad7643e
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column POTENTIAL_MKT_CODE
|
||||
dataType: string
|
||||
lineageTag: 6e07d663-a549-464f-89c1-8153907caba2
|
||||
summarizeBy: none
|
||||
sourceColumn: POTENTIAL_MKT_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column POTENTIAL_MKT_NAME
|
||||
dataType: string
|
||||
lineageTag: 20933df6-b80a-4b4d-8af1-5c20d198b72d
|
||||
summarizeBy: none
|
||||
sourceColumn: POTENTIAL_MKT_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_DEFAULT_POTENTIAL_MKT
|
||||
dataType: string
|
||||
lineageTag: c73ec8ad-3dc6-4511-9c2a-ffb3bed03f8b
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_DEFAULT_POTENTIAL_MKT
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column POTENTIAL_TYPE_CODE
|
||||
dataType: string
|
||||
lineageTag: 45953c49-c8c2-4483-8b2b-cb48f22cfc65
|
||||
summarizeBy: none
|
||||
sourceColumn: POTENTIAL_TYPE_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column POTENTIAL_TYPE_NAME
|
||||
dataType: string
|
||||
lineageTag: 3c8fca54-985f-4dc0-b5c9-603d029aa44c
|
||||
summarizeBy: none
|
||||
sourceColumn: POTENTIAL_TYPE_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_DEFAULT_POTENTIAL_TYPE
|
||||
dataType: string
|
||||
lineageTag: 6a95c82d-3d20-41fc-bd9c-b588503ceb43
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_DEFAULT_POTENTIAL_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column POTENTIAL_VALUE
|
||||
dataType: double
|
||||
lineageTag: 8e97ef6b-59bf-4931-a5f5-dc154b119047
|
||||
summarizeBy: sum
|
||||
sourceColumn: POTENTIAL_VALUE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column DECILE_GROUP
|
||||
dataType: string
|
||||
lineageTag: 11a21420-5976-4851-88c4-17f69a9fc827
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE_GROUP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DECILE_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 45b3ba27-4159-44e8-a3b5-c6096e351c76
|
||||
summarizeBy: sum
|
||||
sourceColumn: DECILE_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DECILE
|
||||
dataType: string
|
||||
lineageTag: 50c26295-0304-4635-962f-8af21b423278
|
||||
summarizeBy: none
|
||||
sourceColumn: DECILE
|
||||
sortByColumn: DECILE_ORDER
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TARGET_INS_LEVEL
|
||||
dataType: string
|
||||
lineageTag: a8ae1f31-beb5-410d-86cd-0680f288e9cc
|
||||
summarizeBy: none
|
||||
sourceColumn: TARGET_INS_LEVEL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_HP_Potential_AIA = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
with external_sales as (
|
||||
select distinct
|
||||
t1.INST_CODE,
|
||||
t2.market,
|
||||
t1.DATA_SOURCE,
|
||||
t1.AUDIT_COD
|
||||
from dm.dm_tf_external_sales t1
|
||||
left join dm.dm_td_external_market_pack_mapping t2
|
||||
on t1.DATA_SOURCE = t2.DATA_SOURCE
|
||||
and t1.PACK_COD = t2.PACK_COD
|
||||
)
|
||||
select distinct
|
||||
t1.INST_CODE,
|
||||
t1.MARKET,
|
||||
t2.POTENTIAL_MKT_CODE,
|
||||
t2.POTENTIAL_MKT_NAME,
|
||||
t2.IS_DEFULT_POTENTIAL_MKT IS_DEFAULT_POTENTIAL_MKT,
|
||||
t2.POTENTIAL_TYPE_CODE,
|
||||
t2.POTENTIAL_TYPE_NAME,
|
||||
t2.IS_DEFULT_POTENTIAL_TYPE IS_DEFAULT_POTENTIAL_TYPE,
|
||||
t2.POTENTIAL_VALUE,
|
||||
t2.DECILE_GROUP,
|
||||
NVL(t2.DECILE_ORDER,99) as DECILE_ORDER,
|
||||
t2.DECILE,
|
||||
t1.DATA_SOURCE,
|
||||
t1.AUDIT_COD,
|
||||
NVL(t3.TARGET_INS_LEVEL,'') as TARGET_INS_LEVEL
|
||||
from external_sales t1
|
||||
left join dm.dm_td_aia_inst_mkt t2
|
||||
on t1.AUDIT_COD = t2.audit_cod
|
||||
and t1.market = t2.market
|
||||
and t1.DATA_SOURCE = t2.DATA_SOURCE
|
||||
left join dm.dm_aia_targethp_flag t3
|
||||
on t1.AUDIT_COD = t3.inst_code
|
||||
and t1.market = t3.MARKET
|
||||
and t1.DATA_SOURCE = t3.DATA_SOURCE
|
||||
|
||||
|
||||
--SELECT DISTINCT A.INST_CODE, B.MARKET, POTENTIAL_MKT_CODE, POTENTIAL_MKT_NAME, IS_DEFULT_POTENTIAL_MKT,
|
||||
-- POTENTIAL_TYPE_CODE, POTENTIAL_TYPE_NAME, IS_DEFULT_POTENTIAL_TYPE, POTENTIAL_VALUE,
|
||||
-- DECILE_GROUP, NVL(DECILE_ORDER, 99) DECILE_ORDER, DECILE, A.DATA_SOURCE, B.AUDIT_COD, NVL(C.TARGET_INS_LEVEL, '') TARGET_INS_LEVEL, D.AIA_HP_FLAG
|
||||
-- FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
-- LEFT JOIN dm.dm_td_aia_inst_mkt B ON A.inst_code = B.inst_code AND A.DATA_SOURCE = B.DATA_SOURCE
|
||||
-- LEFT JOIN dm.dm_aia_targethp_flag C ON C.inst_code = B.inst_code AND C.DATA_SOURCE = B.DATA_SOURCE AND C.MARKET = B.MARKET
|
||||
-- LEFT JOIN dm.dm_aia_hp_flag D ON A.inst_code = D.inst_code AND A.DATA_SOURCE = D.DATA_SOURCE
|
||||
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
table Dim_InsKey
|
||||
lineageTag: 1ae411dc-3a9c-472c-972e-b57b3309308c
|
||||
|
||||
column exists =
|
||||
|
||||
VAR pot_ins = DISTINCT(Dim_HP_Potential_AIA[INS_MKT_SOURCE])
|
||||
RETURN IF([INS_MKT_SOURCE] IN pot_ins, "y", "n")
|
||||
lineageTag: dfb411a8-e3e1-440b-996d-86873336981d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INS_MKT_SOURCE
|
||||
lineageTag: 64ec5484-4fb4-4b5f-87f4-e41aee88cf59
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_RC[INS_MKT_SOURCE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_InsKey = calculated
|
||||
mode: import
|
||||
source = ```
|
||||
DISTINCT(Dim_RC[INS_MKT_SOURCE])
|
||||
```
|
||||
|
||||
annotation PBI_Id = e3af3bceb3e34d2b9cc087ad1698bd2a
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
table Dim_InsSalesType
|
||||
lineageTag: a283b30f-6bf9-4841-8c06-8b4b27572f51
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: bb18b5aa-6bfd-4939-8466-47b26c985aa8
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_CODE
|
||||
dataType: string
|
||||
lineageTag: 9c662895-6e55-4e30-ae89-d90eeb0c3562
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_PROVIDED_FLAG
|
||||
dataType: string
|
||||
lineageTag: 159a1113-3fcc-4ecc-a837-64c016656898
|
||||
summarizeBy: none
|
||||
sourceColumn: AIA_PROVIDED_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INS_SOURCE = [INST_CODE] & [DATA_SOURCE]
|
||||
lineageTag: 79b1b3c8-2b11-4a02-95c0-877aede3ed54
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVIDED_SOURCE = [AIA_PROVIDED_FLAG] & [DATA_SOURCE]
|
||||
lineageTag: b75764a1-a4a9-4ed0-b0fb-0c761af8f84e
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_InsSalesType = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
DISTINCT
|
||||
A.INST_CODE,
|
||||
CASE WHEN A.DATA_SOURCE <>'AIA(Monthly)' THEN '-1' ELSE AIA_PROVIDED_FLAG END AIA_PROVIDED_FLAG,
|
||||
A.DATA_SOURCE
|
||||
FROM
|
||||
DM.DM_TF_EXTERNAL_SALES A
|
||||
LEFT JOIN dm.dm_aia_provided_flag B
|
||||
ON A.DATA_SOURCE = B.DATA_SOURCE
|
||||
AND A.INST_CODE = B.inst_code
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
table Dim_InsSalesTypeKey_AIA
|
||||
lineageTag: 027aa92b-8b0a-46e6-97fd-799f5a3396cc
|
||||
|
||||
column INS_SOURCE
|
||||
lineageTag: 76d28b8a-4121-424c-a6d9-9d59dafe2a9b
|
||||
summarizeBy: none
|
||||
isNameInferred
|
||||
sourceColumn: Dim_InsSalesType[INS_SOURCE]
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_InsSalesTypeKey_AIA = calculated
|
||||
mode: import
|
||||
source = ```
|
||||
DISTINCT(Dim_InsSalesType[INS_SOURCE])
|
||||
```
|
||||
|
||||
annotation PBI_Id = bbee8e8e0e854ffd95b1a0c1542cf1fa
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
table Dim_InsSalesType_AIASpecial
|
||||
lineageTag: e87a2aeb-7176-416d-82c6-8af2c15345ab
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: d084a2bf-c2d0-4ea9-b8fc-89b9eacf9c90
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_PROVIDED_FLAG
|
||||
dataType: string
|
||||
lineageTag: f6cbcaf8-a86e-49ba-ad01-daba9ed4f9f2
|
||||
summarizeBy: none
|
||||
sourceColumn: AIA_PROVIDED_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVIDED_SOURCE = [PROVIDED_KEY] & [DATA_SOURCE]
|
||||
lineageTag: 28fe87e6-ad0b-4f41-9c2d-ec823dbefbf7
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROVIDED_KEY
|
||||
dataType: string
|
||||
lineageTag: fdcce777-19bd-4c80-9dbf-67676724e4fe
|
||||
summarizeBy: none
|
||||
sourceColumn: PROVIDED_KEY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_InsSalesType_AIASpecial = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT A.DATA_SOURCE,B.AIA_PROVIDED_FLAG ,CASE WHEN A.DATA_SOURCE = 'AIA(Monthly)' THEN B.AIA_PROVIDED_FLAG ELSE '' END PROVIDED_KEY
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
INNER JOIN (SELECT DISTINCT aia_provided_flag FROM DM.dm_aia_provided_flag WHERE NVL(AIA_PROVIDED_FLAG,'') <> '') B
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
table Dim_Institution
|
||||
lineageTag: c0020314-ede0-4bf5-af71-1f63368ac6aa
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: ef92d86e-2672-48cb-b067-4d00cf81e2ca
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_CODE
|
||||
dataType: string
|
||||
lineageTag: 0e1528fb-ae58-4b73-a6c2-fe734c464f54
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_NAME
|
||||
dataType: string
|
||||
lineageTag: 7b364ad9-6e06-45a2-b407-269122777845
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_TYPE
|
||||
dataType: string
|
||||
lineageTag: b422bc30-7174-4c1e-8117-7ababf1767a0
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_SUB_TYPE
|
||||
dataType: string
|
||||
lineageTag: 97c97591-1e35-4a47-b883-a00bfe81b35d
|
||||
summarizeBy: none
|
||||
sourceColumn: INST_SUB_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INS_LEVEL
|
||||
dataType: string
|
||||
lineageTag: 00eafba3-6a05-4888-b4f3-01d9fca3a621
|
||||
summarizeBy: none
|
||||
sourceColumn: INS_LEVEL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INST_SOURCE = [INST_CODE] & [DATA_SOURCE]
|
||||
lineageTag: 3b4b18cd-ef02-4997-be9d-92f52044c84d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Institution = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT A.DATA_SOURCE,A.INST_CODE,NVL(B.inst_name,'') INST_NAME,B.INST_TYPE, B.INST_SUB_TYPE, B.org_level_desc INS_LEVEL FROM dm.dm_tf_external_sales a
|
||||
left join dm.dm_td_institution b on a.inst_code = b.inst_code
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
table Dim_IsEagle_AIASpecial
|
||||
lineageTag: c34d37c1-0fa9-4028-b722-cc5f40d5a0c6
|
||||
|
||||
column IS_EAGLE_FLAG_CODE
|
||||
dataType: string
|
||||
lineageTag: 44dd3005-dc3e-411d-94a5-1a80078caceb
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_EAGLE_FLAG_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column is_eagle
|
||||
dataType: string
|
||||
lineageTag: 4ba13d1a-aae9-442f-b89e-ee8cd2e07faa
|
||||
summarizeBy: none
|
||||
sourceColumn: is_eagle
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_IsEagle_AIASpecial = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
select
|
||||
CONCAT(AUDIT_COD, MARKET, DATA_SOURCE) AS IS_EAGLE_FLAG_CODE,
|
||||
CASE when MARKET = 'AIA ALL Market' and DATA_SOURCE = 'AIA(Monthly)' then ' ' --AIA ALL Market 不用挂eagle flag
|
||||
WHEN is_eagle IN ('雾针等级医院','消化口服医院') THEN is_eagle
|
||||
else ' ' END AS is_eagle
|
||||
--is_eagle
|
||||
FROM
|
||||
dm.dm_td_aia_is_eagle_flag
|
||||
group by
|
||||
1,2
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
table Dim_IsEagle_Bridge_AIASpecial
|
||||
lineageTag: 89dbfcfb-07fa-4e64-881f-006e993e6e8f
|
||||
|
||||
column IS_EAGLE_FLAG_CODE
|
||||
dataType: string
|
||||
lineageTag: c3cd36ab-cd38-4c83-9b66-a547708c1355
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_EAGLE_FLAG_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_IsEagle_Bridge_AIASpecial = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
CASE
|
||||
WHEN a.data_source = 'AIA(Monthly)' THEN CONCAT(AUDIT_COD, MARKET, DATA_SOURCE)
|
||||
else DATA_SOURCE
|
||||
end AS IS_EAGLE_FLAG_CODE
|
||||
FROM
|
||||
dm.dm_td_external_org A
|
||||
group by
|
||||
1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Filtered Rows" = Table.SelectRows(Source, each [IS_EAGLE_FLAG_CODE] <> null and [IS_EAGLE_FLAG_CODE] <> "")
|
||||
in
|
||||
#"Filtered Rows"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
table Dim_IsTarget_AIASpecial
|
||||
lineageTag: 6eb3e95e-4ee6-4745-a70e-640a321d49bf
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: d2b25a39-907e-475d-b5d4-d73c08ca1c98
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_TARGET_HP
|
||||
dataType: string
|
||||
lineageTag: 6109e25a-2bab-4759-89e8-d035eec074cf
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_TARGET_HP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ISTARGET_SOURCE = [TARGET_KEY] & [DATA_SOURCE]
|
||||
lineageTag: db9571f9-7f4d-49d6-bf90-d692d2b8efe0
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TARGET_KEY
|
||||
dataType: string
|
||||
lineageTag: 391636df-d56a-4749-b7ce-b9b041c45abb
|
||||
summarizeBy: none
|
||||
sourceColumn: TARGET_KEY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_IsTarget_AIASpecial = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT A.DATA_SOURCE,B.IS_TARGET_HP ,CASE WHEN A.DATA_SOURCE = 'AIA(Monthly)' THEN B.IS_TARGET_HP ELSE '' END TARGET_KEY
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
INNER JOIN (SELECT DISTINCT is_target_hp FROM DM.dm_aia_targethp_flag WHERE NVL(IS_TARGET_HP,'') <> '') B
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
table Dim_KeyCompetitor
|
||||
lineageTag: a6eb142e-da93-4631-939c-d1305beec9f0
|
||||
|
||||
column KEY_COMPETITOR
|
||||
dataType: string
|
||||
lineageTag: 84a16438-9e6c-43a0-a64d-b7882754114e
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEY_COMPETITOR_CN
|
||||
dataType: string
|
||||
lineageTag: 132b2f1b-ad21-4104-8270-3d5aafb423a5
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR_CN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_KeyCompetitor = m
|
||||
mode: import
|
||||
queryGroup: OLD
|
||||
source = ```
|
||||
let
|
||||
Source = Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress,
|
||||
HttpPath,
|
||||
[
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,
|
||||
EnableQueryResultDownload = "0"
|
||||
]
|
||||
){[Name = CatalogName, Kind = "Database"]}[Data],
|
||||
"
|
||||
WITH
|
||||
distinct_competitor (
|
||||
SELECT DISTINCT
|
||||
KEY_COMPETITOR
|
||||
FROM
|
||||
DM.DM_TD_EXT_UNIONALL_MARKET_PACK_MAPPING
|
||||
WHERE KEY_COMPETITOR is NOT NULL
|
||||
)
|
||||
SELECT
|
||||
KEY_COMPETITOR,
|
||||
NVL(MAX(t2.PROD_DESC_C), MAX(t1.KEY_COMPETITOR)) KEY_COMPETITOR_CN
|
||||
FROM
|
||||
distinct_competitor t1
|
||||
LEFT JOIN DM.DM_TD_EXT_UNIONALL_PACKINFO t2 ON t1.KEY_COMPETITOR = t2.PROD_DESC
|
||||
GROUP BY
|
||||
1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[EnableFolding = true]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
table Dim_MKTPackMapping
|
||||
lineageTag: 4faa718f-9d72-42fd-b611-ae3456efb818
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: f929b590-3327-45cc-9bdd-3e36fb798a43
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES
|
||||
dataType: string
|
||||
lineageTag: 39cca25f-cf41-44b3-bf88-1060c058728e
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: f5a2d4f4-ef98-472c-a8c5-e10d4157861b
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 236ff874-0645-4a1b-a952-a4584bbe3b90
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: a9af738b-c6a7-45bf-aaa1-457f6c190515
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VALUE_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: ed9c1da4-f249-48ec-9a22-35fa2aec2850
|
||||
summarizeBy: sum
|
||||
sourceColumn: VALUE_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column UNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: 3aa2947e-e094-4d49-a034-c0d2db024515
|
||||
summarizeBy: sum
|
||||
sourceColumn: UNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column COUNTINGUNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: c7debf53-3444-481a-9f21-5e3c5710b2c0
|
||||
summarizeBy: sum
|
||||
sourceColumn: COUNTINGUNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 68d2c6a9-3b5f-4c1b-8e10-bea75569a878
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: 3831b652-2df2-4a51-bafc-021966147422
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS_SOURCE = [MARKET] & [CLASS] & [DATA_SOURCE]
|
||||
lineageTag: 24a198f0-9134-4367-aa72-b975194438a1
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: a1e06cb5-6f0c-4e69-8c96-286c90adfe28
|
||||
summarizeBy: sum
|
||||
sourceColumn: PDOT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column CLASS_DES = [CLASS]
|
||||
lineageTag: 8773177c-36be-440f-b0bf-5b64d1d4141e
|
||||
summarizeBy: none
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = [PACK_COD] & [DATA_SOURCE] & [new_code]
|
||||
lineageTag: 893f7007-fe3e-404e-a05d-eceab4cc7571
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEY_COMPETITOR
|
||||
dataType: string
|
||||
lineageTag: 609d6b37-69a6-43ab-9b56-71cfdbfa60a0
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NEW_CODE
|
||||
dataType: string
|
||||
lineageTag: 75a3a5f0-6b3e-4001-9623-c7fa4ac45f53
|
||||
summarizeBy: none
|
||||
sourceColumn: NEW_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES =
|
||||
RELATED(Dim_PackInfo[CMPS_DES])
|
||||
// LOOKUPVALUE(Dim_PackInfo[CMPS_DES],Dim_PackInfo[PACK_SOURCE],[PACK_SOURCE])
|
||||
lineageTag: 63d4ad34-76a2-4200-b785-b22d45447d9c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MOLECULE_SOURCE = [CMPS_DES] & [DATA_SOURCE]
|
||||
lineageTag: 4ebdb8a9-984b-43cb-9326-46d0a83c33f0
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KEY_COMPETITOR_CN
|
||||
dataType: string
|
||||
lineageTag: 3b7b1fd2-727c-4357-958c-60a9c0b21edb
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY_COMPETITOR_CN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_TEXT = "counting unit"
|
||||
lineageTag: c9c27571-87a3-4ca2-9039-5b480a80c43d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_MARKET_RATIO_LEVEL = LOOKUPVALUE(Config_MarketRatio[brandratio_countingunit_level],Config_MarketRatio[MARKET],[MARKET],Config_MarketRatio[PACK_COD],[PACK_COD])
|
||||
lineageTag: 4538708d-0b3c-4676-8ba5-8c3c948fb07a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AIA_Remove
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 7f57ca04-d157-4e79-b8ef-c31fb5f2b36e
|
||||
summarizeBy: sum
|
||||
sourceColumn: AIA_Remove
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MKTPackMapping = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT
|
||||
A.PACK_COD,
|
||||
A.PROD_DES,
|
||||
A.PROD_DES_C,
|
||||
A.MARKET,CLASS,
|
||||
CAST(VALUE_MARKET_RATIO AS DECIMAL(38, 20)) VALUE_MARKET_RATIO,
|
||||
CAST(UNIT_MARKET_RATIO AS DECIMAL(38, 20)) UNIT_MARKET_RATIO,
|
||||
CAST(COUNTINGUNIT_MARKET_RATIO AS DECIMAL(38, 20)) COUNTINGUNIT_MARKET_RATIO,
|
||||
CAST(PDOT_MARKET_RATIO AS DECIMAL(38, 20)) PDOT_MARKET_RATIO,
|
||||
A.DATA_SOURCE,
|
||||
A.KEY_COMPETITOR,A.KEY_COMPETITOR_CN,A.NEW_CODE,
|
||||
CASE WHEN B.hidden_market is not null THEN 0 ELSE 1 END AS AIA_Remove
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_MARKET_PACK_MAPPING A
|
||||
left join (
|
||||
select distinct
|
||||
hidden_market
|
||||
from dwd.dwd_gnd_ims_hidden_market
|
||||
where data_source = 'AIA') B
|
||||
on A.DATA_SOURCE = 'AIA(Monthly)' AND A.MARKET = B.hidden_market
|
||||
UNION ALL
|
||||
select
|
||||
'DTPOTHERS' as PACK_COD
|
||||
,'DTPOTHERS' as PROD_DES
|
||||
,'DTPOTHERS' as PROD_DES_C
|
||||
,'EGFR TKI Market' as MARKET
|
||||
,'Others' as CLASS
|
||||
,1 as VALUE_MARKET_RATIO
|
||||
,1 as UNIT_MARKET_RATIO
|
||||
,1 as COUNTINGUNIT_MARKET_RATIO
|
||||
,1 as PDOT_MARKET_RATIO
|
||||
,'DTP(Quarterly)' as DATA_SOURCE
|
||||
,'OTHERS' as KEY_COMPETITOR
|
||||
,'OTHERS' as KEY_COMPETITOR_CN
|
||||
,'' as NEW_CODE
|
||||
, 1
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
table Dim_MKTPackMapping_Total
|
||||
lineageTag: 9b1443ac-f3d1-463f-aab8-71d10b8163f3
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 9fb40282-1f71-4aac-bb5f-b66e522ddbd6
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES
|
||||
dataType: string
|
||||
lineageTag: 482bb682-c003-430e-9499-947c52d3fa57
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 1fad37d6-80d8-4a0d-8517-b058f0705db4
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VALUE_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: be70705e-e5c9-439f-a7be-922ae132ba92
|
||||
summarizeBy: sum
|
||||
sourceColumn: VALUE_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column UNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: 0ad11eb4-4ee1-4335-b44f-fc5f8637f196
|
||||
summarizeBy: sum
|
||||
sourceColumn: UNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column COUNTINGUNIT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: f3795085-aadd-4b7e-933c-680f115c834f
|
||||
summarizeBy: sum
|
||||
sourceColumn: COUNTINGUNIT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column MKT_PROD = [MARKET]&[PROD_DES]
|
||||
lineageTag: be8033e8-62dd-4fe5-a0e2-95032ab7b827
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CLASS
|
||||
dataType: string
|
||||
lineageTag: 9e0a4ed7-2972-4f1f-96fe-56a1b86c82c7
|
||||
summarizeBy: none
|
||||
sourceColumn: CLASS
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: 59e4ae4d-e4ca-4f73-9d16-f71c0090122e
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 4be6209f-5ecc-42cb-b728-5ba5958f15de
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: f2e071d9-d686-461a-9830-caffd606a79c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PDOT_MARKET_RATIO
|
||||
dataType: double
|
||||
lineageTag: 0d60a930-4065-4337-be22-d8b63596da80
|
||||
summarizeBy: sum
|
||||
sourceColumn: PDOT_MARKET_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column PACK_SOURCE = [PACK_COD] & [DATA_SOURCE]
|
||||
lineageTag: 7b03092f-fcb6-4575-a506-d22037efb5bd
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MKTPackMapping_Total = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
DISTINCT PACK_COD,PROD_DES,PROD_DES_C,MARKET,CLASS
|
||||
,CAST(VALUE_MARKET_RATIO AS DECIMAL(38,20)) VALUE_MARKET_RATIO
|
||||
,CAST(UNIT_MARKET_RATIO AS DECIMAL(38,20)) UNIT_MARKET_RATIO
|
||||
,case when DATA_SOURCE = 'EC(Monthly)' then 1 ELSE CAST(COUNTINGUNIT_MARKET_RATIO AS DECIMAL(38, 20)) END as COUNTINGUNIT_MARKET_RATIO
|
||||
,CAST(PDOT_MARKET_RATIO AS DECIMAL(38,20)) PDOT_MARKET_RATIO,DATA_SOURCE
|
||||
|
||||
FROM DM.DM_TD_EXTERNAL_MARKET_PACK_MAPPING
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
table Dim_Market
|
||||
lineageTag: e93174e2-bfca-4d29-bee7-23d72512e194
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: c4b7fc72-7699-4b46-8f69-6e02c3e60a34
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 9fa25815-cb00-4aed-a575-004f8eb364ca
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: e349104c-04dc-4a09-817a-9a7e1fde69c4
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET_DESC
|
||||
dataType: string
|
||||
lineageTag: 744a9e83-2d15-4141-abfc-1710b4eeb2f9
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: a506b979-b8e3-4a1f-9626-b0d4dd9f68d3
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PRD_FLAG
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 0086fea7-593d-4594-aaaa-25f46deff9b7
|
||||
summarizeBy: sum
|
||||
sourceColumn: PRD_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_FLAG
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 7363e8b1-577c-4e33-85fb-433d3e497d9b
|
||||
summarizeBy: sum
|
||||
sourceColumn: MKT_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_HIDDEN_COUNTY
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: f991248d-5cae-4b11-8178-7d460f1fa073
|
||||
summarizeBy: sum
|
||||
sourceColumn: IS_HIDDEN_COUNTY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MERGED_DATA_MARKET
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 461a059a-38d1-40b1-a812-ea37f7eb7f42
|
||||
summarizeBy: sum
|
||||
sourceColumn: MERGED_DATA_MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Market = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
WITH COUNTY_MARKET as (
|
||||
select
|
||||
MARKET,
|
||||
TA_MAP
|
||||
from
|
||||
dm.dm_td_external_market_ta
|
||||
WHERE
|
||||
TA_MAP in ('ONCO', 'RARE')
|
||||
GROUP BY
|
||||
1,
|
||||
2
|
||||
),
|
||||
MERGED_DATA AS (
|
||||
select
|
||||
t1.market
|
||||
from
|
||||
(
|
||||
select
|
||||
MARKET
|
||||
from
|
||||
DM.DM_TD_EXTERNAL_MARKET
|
||||
where
|
||||
DATA_SOURCE = 'AIA(Monthly)'
|
||||
group by
|
||||
1
|
||||
) t1
|
||||
inner join (
|
||||
select
|
||||
MARKET
|
||||
from
|
||||
DM.DM_TD_EXTERNAL_MARKET
|
||||
where
|
||||
DATA_SOURCE = 'IQVIA-CHPA(Monthly)'
|
||||
group by
|
||||
1
|
||||
) t2
|
||||
on t1.market = t2.market
|
||||
)
|
||||
SELECT
|
||||
A.MARKET,
|
||||
A.DATA_SOURCE,
|
||||
A.MARKET_DESC,
|
||||
A.AZ_RELATED TA,
|
||||
INT(A.PRD_FLAG) PRD_FLAG,
|
||||
CASE
|
||||
-------------Retail
|
||||
WHEN
|
||||
A.DATA_SOURCE = 'Retail(Quarterly)'
|
||||
AND A.MARKET IN (
|
||||
'Inhaled Extended Market',
|
||||
'NIAD (Non-Insulin Anti-Diabetic) Market',
|
||||
'Rosuvastatin Market',
|
||||
'BUDESONIDE Market',
|
||||
'EGFR TKI Market',
|
||||
'Anti-HER2 Market',
|
||||
'Anti-HER2 mBC Market',
|
||||
'Fasenra Market',
|
||||
'Severe Asthma',
|
||||
'DAPA Market'
|
||||
)
|
||||
THEN
|
||||
1
|
||||
-------------DTP
|
||||
WHEN
|
||||
A.DATA_SOURCE = 'DTP(Quarterly)'
|
||||
AND A.MARKET IN (
|
||||
'Anti-HER2 Market',
|
||||
'Anti-HER2 mBC Market',
|
||||
'Fasenra/Tezspire Related Market',
|
||||
'Severe Asthma',
|
||||
'Tezspire CRSwNP Market',
|
||||
'CRSwNP Market',
|
||||
'PAM Market'
|
||||
)
|
||||
THEN
|
||||
1
|
||||
WHEN
|
||||
A.DATA_SOURCE = 'Retail(Quarterly)'
|
||||
AND A.MARKET IN ('Respules Market', 'HTN Market')
|
||||
THEN
|
||||
2
|
||||
ELSE 0
|
||||
END MKT_FLAG,
|
||||
CASE
|
||||
WHEN B.TA_MAP = 'RARE' THEN 1
|
||||
WHEN B.TA_MAP = 'ONCO' THEN 2
|
||||
ELSE 0
|
||||
END AS IS_HIDDEN_COUNTY,
|
||||
CASE
|
||||
WHEN C.MARKET IS NOT NULL THEN 1
|
||||
ELSE 0
|
||||
END AS MERGED_DATA_MARKET
|
||||
FROM
|
||||
DM.dm_td_ext_unionall_market A
|
||||
LEFT JOIN COUNTY_MARKET B
|
||||
ON A.MARKET = B.MARKET
|
||||
LEFT JOIN MERGED_DATA C
|
||||
ON A.MARKET = C.MARKET
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
table Dim_MarketTA
|
||||
lineageTag: afacd2f2-f2f7-4281-ab5d-81ce59e8dd6b
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 627fc8ad-3e2f-4c1e-bef1-78b0bc422aad
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: 3047c32e-71e6-42fa-a02e-993f5a460c49
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
sortByColumn: TA_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_RN
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 48473ec5-b9fa-4428-a1bb-9ff5c7efe06c
|
||||
summarizeBy: sum
|
||||
sourceColumn: TA_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: f60d7f37-34f6-4afb-a927-b04ae50d33cb
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: f8ed9a55-0e5b-4ecd-844c-1f74641ec184
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET_DESC
|
||||
dataType: string
|
||||
lineageTag: e8cb778c-9cd1-4643-8696-6a1cda4af99c
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_SOURCE =
|
||||
|
||||
// 2.1 EC数据源对应NIAD和DM要保持一样的数据
|
||||
SWITCH(TRUE(),[DATA_SOURCE] = "EC(Monthly)"&& [TA] = "NIAD","DMEC(Monthly)",
|
||||
[TA] & [DATA_SOURCE])
|
||||
lineageTag: 1b085954-9d8d-4e94-9a05-9c7eaf148b99
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_MAP
|
||||
dataType: string
|
||||
lineageTag: 53b34554-bdbb-42d5-887d-7285705c5426
|
||||
summarizeBy: none
|
||||
sourceColumn: TA_MAP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_SOURCE2 = [TA_MAP] & [DATA_SOURCE]
|
||||
lineageTag: f76019ab-dba0-4fbd-81b1-be0d09823b2c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MarketTA = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT
|
||||
MARKET,
|
||||
TA,
|
||||
TA_MAP,
|
||||
TA_RN,
|
||||
MARKET_DESC,
|
||||
DATA_SOURCE
|
||||
FROM
|
||||
dm.dm_td_ext_unionall_market_ta
|
||||
WHERE
|
||||
TA <> ''
|
||||
OR TA_MAP <> ''
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
table Dim_MarketTA_Total
|
||||
lineageTag: 9828a88e-525f-44ef-8342-ff83d4d771d8
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 115c4441-f12d-4312-b5e6-4c40e32dc55f
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA
|
||||
dataType: string
|
||||
lineageTag: dd0a146f-2af9-4b0b-adac-06d4616c733d
|
||||
summarizeBy: none
|
||||
sourceColumn: TA
|
||||
sortByColumn: TA_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_RN
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 4573c194-9e45-4e33-9622-afa5083766e8
|
||||
summarizeBy: sum
|
||||
sourceColumn: TA_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: be443384-9a16-4578-bd7a-fb950c6d4309
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: e1aa3578-ae39-426b-ae7d-28db8be01f14
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET_DESC
|
||||
dataType: string
|
||||
lineageTag: 4ec40049-d872-4938-ac9b-116f6ab21241
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TA_SOURCE = [TA] & [DATA_SOURCE]
|
||||
lineageTag: 240ce796-54f0-400d-8e23-9f848c0c7d30
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MarketTA_Total = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT MARKET,
|
||||
CASE WHEN MARKET = 'Fasenra Market' AND DATA_SOURCE = 'Retail(Quarterly)' THEN NULL ELSE TA END AS TA
|
||||
,TA_RN,MARKET_DESC,DATA_SOURCE FROM DM.DM_TD_EXTERNAL_MARKET_TA
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
table Dim_Market_Total
|
||||
lineageTag: e3bea067-c208-4eb5-84c4-2dd40535ed78
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 4a090ffe-8e70-41ce-9490-242cc464aafa
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 4f61126f-3948-4eac-9f4c-de8de77ea89a
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: 119c40cb-6ca0-4142-8bfc-b8f0add2d35d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Market_Total = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT MARKET,DATA_SOURCE FROM DM.DM_TD_EXTERNAL_MARKET"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
table Dim_MergeDataSource
|
||||
lineageTag: b9ec943e-c3e6-4334-a98c-527f4e55ccd6
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 15289739-f23f-4232-97fe-cba489e38214
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_MergeDataSource = m
|
||||
mode: import
|
||||
queryGroup: OLD\FreeReport独有表
|
||||
source =
|
||||
let
|
||||
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8ssvyk3MUYrViVZyCQkA084eAY5ghqMnkI4FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DATA_SOURCE = _t]),
|
||||
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DATA_SOURCE", type text}})
|
||||
in
|
||||
#"Changed Type"
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,482 @@
|
||||
table Dim_Org
|
||||
lineageTag: 85f1d649-64ef-43b0-85a7-8dd1e01437f3
|
||||
|
||||
column REGION_CODE_DESC = [REGION_CODE] & " - " & [REGION_NAME_EN]
|
||||
lineageTag: 1654abce-f007-4294-91ad-f420a5b23805
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RC_CODE_DESC = [RC_CODE] & " - " & [RC_NAME_EN]
|
||||
lineageTag: 40f38a30-1a2a-4867-bca9-42ff6c147ffe
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column region_name_en
|
||||
dataType: string
|
||||
lineageTag: d5f68ced-e54c-436f-87ae-6bf9c757cd73
|
||||
summarizeBy: none
|
||||
sourceColumn: region_name_en
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rc_code
|
||||
dataType: string
|
||||
lineageTag: ed896ef1-79fc-48f9-b2bd-fac125d243e9
|
||||
summarizeBy: none
|
||||
sourceColumn: rc_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rc_name_en
|
||||
dataType: string
|
||||
lineageTag: 4447c25d-e0c5-4395-932c-3f4875b8050e
|
||||
summarizeBy: none
|
||||
sourceColumn: rc_name_en
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column bu_category
|
||||
dataType: string
|
||||
lineageTag: 34888f0a-251d-4489-844a-34b759458c3a
|
||||
summarizeBy: none
|
||||
sourceColumn: bu_category
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column bu_name_en
|
||||
dataType: string
|
||||
lineageTag: 35d50f36-950c-4daa-b239-706081a47eb6
|
||||
summarizeBy: none
|
||||
sourceColumn: bu_name_en
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column sub_bu_name
|
||||
dataType: string
|
||||
lineageTag: 06254d64-a12d-4e4b-8e58-15309bd030b1
|
||||
summarizeBy: none
|
||||
sourceColumn: sub_bu_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column team
|
||||
dataType: string
|
||||
lineageTag: bea0a9cb-bff8-4759-8349-2591288eb7ac
|
||||
summarizeBy: none
|
||||
sourceColumn: team
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column dsm_kcode
|
||||
dataType: string
|
||||
lineageTag: acf34109-0acd-4d86-a7d8-2c00c95773da
|
||||
summarizeBy: none
|
||||
sourceColumn: dsm_kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column dsm_name
|
||||
dataType: string
|
||||
lineageTag: f4307294-8461-4ed0-ad0f-f4b3069d193e
|
||||
summarizeBy: none
|
||||
sourceColumn: dsm_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column mr_trty_code
|
||||
dataType: string
|
||||
lineageTag: d0dd1430-fe90-40f0-82d4-79f56477c26e
|
||||
summarizeBy: none
|
||||
sourceColumn: mr_trty_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column mr_kcode
|
||||
dataType: string
|
||||
lineageTag: d9e44f07-8f15-408d-8972-dc9e8d84a9bd
|
||||
summarizeBy: none
|
||||
sourceColumn: mr_kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column mr_name
|
||||
dataType: string
|
||||
lineageTag: 29393d71-6eba-48f4-8909-f07e100b2e29
|
||||
summarizeBy: none
|
||||
sourceColumn: mr_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column RC_NAME
|
||||
dataType: string
|
||||
lineageTag: 840b5add-6f02-4cf4-8032-664db94fed75
|
||||
summarizeBy: none
|
||||
sourceColumn: RC_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column region_code
|
||||
dataType: string
|
||||
lineageTag: 19adebc6-97b2-4e00-acba-782fa49baa2d
|
||||
summarizeBy: none
|
||||
sourceColumn: region_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column nsd_kcode
|
||||
dataType: string
|
||||
lineageTag: dbbbac41-38d3-497e-9697-1e01d48d08bd
|
||||
summarizeBy: none
|
||||
sourceColumn: nsd_kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column nsd_name
|
||||
dataType: string
|
||||
lineageTag: f1bcfe22-4e68-4ab3-a044-cd784649a1ed
|
||||
summarizeBy: none
|
||||
sourceColumn: nsd_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rsd_kcode
|
||||
dataType: string
|
||||
lineageTag: 8d9aa51e-3885-4b45-8ad8-a53a2da65231
|
||||
summarizeBy: none
|
||||
sourceColumn: rsd_kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rsd_name
|
||||
dataType: string
|
||||
lineageTag: b8baede2-1403-47f0-98aa-177fb349a9a9
|
||||
summarizeBy: none
|
||||
sourceColumn: rsd_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rsm_kcode
|
||||
dataType: string
|
||||
lineageTag: ffc0d175-563b-4b9f-88b3-31fab7d1c459
|
||||
summarizeBy: none
|
||||
sourceColumn: rsm_kcode
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rsm_name
|
||||
dataType: string
|
||||
lineageTag: fd0d91aa-7f4b-4f51-a70a-4436df0428a7
|
||||
summarizeBy: none
|
||||
sourceColumn: rsm_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rc_name_en_n
|
||||
dataType: string
|
||||
lineageTag: 7451241f-6d33-4a10-b3ab-4d0f5de35c4c
|
||||
summarizeBy: none
|
||||
sourceColumn: rc_name_en_n
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column region_name_en_n
|
||||
dataType: string
|
||||
lineageTag: 37737e9c-e383-4124-b8ff-a91a7ea88df2
|
||||
summarizeBy: none
|
||||
sourceColumn: region_name_en_n
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Org-00dafd9e-60ac-4454-a463-b2187d119357 = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
// "
|
||||
// SELECT DISTINCT A.REGION_CODE,A.region_name_en,A.rc_code,A.rc_name_en,A.RegionCenter,A.AUDIT_COD,A.MARKET,
|
||||
// CASE WHEN bu_category IN ('All Channel','EC') AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC' WHEN A.region_name_en = 'ROC' THEN 'ROC' WHEN A.rc_name_en = 'ROC' THEN 'ROC' ELSE bu_category END bu_category,
|
||||
// CASE WHEN bu_category IN ('All Channel','EC') AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC' WHEN A.region_name_en = 'ROC' THEN 'ROC' WHEN A.rc_name_en = 'ROC' THEN 'ROC' ELSE bu_name_en END bu_name_en,
|
||||
// CASE WHEN bu_category IN ('All Channel','EC') AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC' WHEN A.region_name_en = 'ROC' THEN 'ROC' WHEN A.rc_name_en = 'ROC' THEN 'ROC' ELSE sub_bu_name END sub_bu_name,sub_bu_code_auth,bu_code_auth,
|
||||
// A.DATA_SOURCE,REGION_RATIO,CASE WHEN bu_category IN ('All Channel','EC') AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC' WHEN A.region_name_en = 'ROC' THEN 'ROC' ELSE RSM_Name END RSM_Name,
|
||||
// CASE WHEN bu_category IN ('All Channel','EC') AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC' WHEN A.rc_name_en = 'ROC' THEN 'ROC' ELSE A.RC_Name END RC_Name,
|
||||
// CASE WHEN A.region_name_en = 'ROC' THEN 2 ELSE 1 END REGION_RN,CASE WHEN A.rc_name_en = 'ROC' THEN 2 ELSE 1 END RC_RN,
|
||||
// team,
|
||||
// dsm_kcode,
|
||||
// dsm_name,
|
||||
// mr_trty_code,
|
||||
// mr_kcode,
|
||||
// mr_name,
|
||||
// -- B.INST_CODE,NVL(B.inst_name,'') INST_NAME,B.INST_TYPE, B.INST_SUB_TYPE, B.org_level_desc INS_LEVEL,
|
||||
// C.IS_TARGET_HP, C.SUB_CHANNEL , C.DRAGON_FLAG, C.KA_FLAG
|
||||
// ,C.SUB_CHANNEL_ORDER
|
||||
// FROM dm.dm_td_external_org A
|
||||
// -- left join dm.dm_td_institution B on A.AUDIT_COD = NVL(B.INST_CODE, 'ROC')
|
||||
// LEFT JOIN dm.dm_aia_targethp_flag C ON A.AUDIT_COD = NVL(C.INST_CODE, 'ROC') AND A.DATA_SOURCE = C.DATA_SOURCE AND A.MARKET = C.MARKET
|
||||
|
||||
// --WHERE (DATA_SOURCE = 'IQVIA-CHPA(Monthly)' AND bu_category NOT IN ('All Channel','EC')) OR DATA_SOURCE <> 'IQVIA-CHPA(Monthly)'
|
||||
"WITH
|
||||
dm_td_org_temp AS (
|
||||
SELECT
|
||||
org_key,
|
||||
mr_trty_tag,
|
||||
district_code,
|
||||
rsm_name,
|
||||
rc_name,
|
||||
p2.region_name,
|
||||
p2.rsd_kcode,
|
||||
p2.rsd_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_code = 'PC12' THEN 'PC09'
|
||||
ELSE p2.bu_code
|
||||
END bu_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_report = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_report
|
||||
END bu_report,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_code = 'NA27' THEN 'NA06'
|
||||
ELSE p2.sub_bu_code
|
||||
END sub_bu_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_name = 'EC' THEN 'Retail'
|
||||
ELSE p2.sub_bu_name
|
||||
END sub_bu_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_name_en = 'EC' THEN 'Retail'
|
||||
ELSE p2.sub_bu_name_en
|
||||
END sub_bu_name_en,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_name
|
||||
END bu_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name_en = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_name_en
|
||||
END bu_name_en,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.nsd_kcode = 'ND_EC0001_V' THEN 'KSGX559'
|
||||
ELSE p2.nsd_kcode
|
||||
END nsd_kcode,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name = 'EC'
|
||||
AND p2.nsd_name = 'Vacant' THEN '李白杨'
|
||||
ELSE p2.nsd_name
|
||||
END nsd_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.nsd_trty_code = 'ND_EC0001' THEN 'ND_RT0001'
|
||||
ELSE p2.nsd_trty_code
|
||||
END nsd_trty_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bsd_kcode = 'VP_EC0001_V' THEN 'VP_RT0001_V'
|
||||
ELSE p2.bsd_kcode
|
||||
END bsd_kcode,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bsd_trty_code = 'VP_EC0001' THEN 'VP_RT0001'
|
||||
ELSE p2.bsd_trty_code
|
||||
END bsd_trty_code,
|
||||
p2.rsm_kcode,
|
||||
p2.rc_code,
|
||||
p2.rc_name_en,
|
||||
p2.region_code,
|
||||
p2.region_name_en,
|
||||
BU_CATEGORY,
|
||||
yyyymm,
|
||||
mr_trty_code,
|
||||
mr_kcode,
|
||||
dsm_trty_code,
|
||||
rsm_trty_code,
|
||||
dsm_kcode,
|
||||
rsd_trty_code,
|
||||
district_name,
|
||||
dsm_name,
|
||||
mr_name
|
||||
FROM
|
||||
DM.dm_td_org P2
|
||||
WHERE
|
||||
yyyymm IN (
|
||||
SELECT
|
||||
key_value
|
||||
FROM
|
||||
dm.dm_td_date_config
|
||||
WHERE
|
||||
key_code = 'pfmc_cvh'
|
||||
)
|
||||
AND mr_trty_code <> ''
|
||||
)
|
||||
SELECT DISTINCT
|
||||
mr_trty_code,
|
||||
bu_category,
|
||||
bu_name_en,
|
||||
sub_bu_name,
|
||||
rc_code,
|
||||
rc_name AS rc_name_en,
|
||||
rc_name_en AS rc_name_en_n,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS RC_NAME,
|
||||
region_code,
|
||||
region_name AS region_name_en,
|
||||
region_name_en AS region_name_en_n,
|
||||
district_name AS team,
|
||||
nsd_kcode,
|
||||
CASE
|
||||
WHEN nsd_name = 'Vacant' THEN nsd_kcode
|
||||
ELSE nsd_name
|
||||
END AS nsd_name,
|
||||
rsd_kcode,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS rsd_name,
|
||||
rsm_kcode,
|
||||
CASE
|
||||
WHEN rsm_name = 'Vacant' THEN rsm_kcode
|
||||
ELSE rsm_name
|
||||
END AS rsm_name,
|
||||
dsm_kcode,
|
||||
CASE
|
||||
WHEN dsm_name = 'Vacant' THEN dsm_kcode
|
||||
ELSE dsm_name
|
||||
END AS dsm_name,
|
||||
mr_kcode,
|
||||
CASE
|
||||
WHEN mr_name = 'Vacant' THEN mr_kcode
|
||||
ELSE mr_name
|
||||
END AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
rsm_trty_code AS mr_trty_code,
|
||||
bu_category,
|
||||
bu_name_en,
|
||||
sub_bu_name,
|
||||
rc_code,
|
||||
rc_name AS rc_name_en,
|
||||
rc_name_en AS rc_name_en_n,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS RC_NAME,
|
||||
region_code,
|
||||
region_name AS region_name_en,
|
||||
region_name_en AS region_name_en_n,
|
||||
'' AS team,
|
||||
nsd_kcode,
|
||||
CASE
|
||||
WHEN nsd_name = 'Vacant' THEN nsd_kcode
|
||||
ELSE nsd_name
|
||||
END AS nsd_name,
|
||||
rsd_kcode,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS rsd_name,
|
||||
rsm_kcode,
|
||||
CASE
|
||||
WHEN rsm_name = 'Vacant' THEN rsm_kcode
|
||||
ELSE rsm_name
|
||||
END AS rsm_name,
|
||||
'' AS dsm_kcode,
|
||||
'' AS dsm_name,
|
||||
'' AS mr_kcode,
|
||||
'' AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
UNION ALL
|
||||
SELECT
|
||||
'Vacant' AS mr_trty_code,
|
||||
'ROC' AS bu_category,
|
||||
'ROC' AS bu_name_en,
|
||||
'ROC' AS sub_bu_name,
|
||||
'ROC' AS rc_code,
|
||||
'ROC' AS rc_name_en,
|
||||
'ROC' AS rc_name_en_n,
|
||||
'ROC' AS RC_NAME,
|
||||
'ROC' AS region_code,
|
||||
'ROC' AS region_name_en,
|
||||
'ROC' AS region_name_en_n,
|
||||
'ROC' AS team,
|
||||
'Vacant' AS nsd_kcode,
|
||||
'Vacant' AS nsd_name,
|
||||
'Vacant' AS rsd_kcode,
|
||||
'Vacant' AS rsd_name,
|
||||
'Vacant' AS rsm_kcode,
|
||||
'Vacant' AS rsm_name,
|
||||
'Vacant' AS dsm_kcode,
|
||||
'Vacant' AS dsm_name,
|
||||
'Vacant' AS mr_kcode,
|
||||
'Vacant' AS mr_name
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
concat ('ROC_', nsd_trty_code) AS mr_trty_code,
|
||||
'ROC' AS bu_category,
|
||||
'ROC' AS bu_name_en,
|
||||
'ROC' AS sub_bu_name,
|
||||
'ROC' AS rc_code,
|
||||
'ROC' AS rc_name_en,
|
||||
'ROC' AS rc_name_en_n,
|
||||
'ROC' AS RC_NAME,
|
||||
'ROC' AS region_code,
|
||||
'ROC' AS region_name_en,
|
||||
'ROC' AS region_name_en_n,
|
||||
'ROC' AS team,
|
||||
nsd_kcode,
|
||||
nsd_name,
|
||||
'Vacant' AS rsd_kcode,
|
||||
'Vacant' AS rsd_name,
|
||||
'Vacant' AS rsm_kcode,
|
||||
'Vacant' AS rsm_name,
|
||||
'Vacant' AS dsm_kcode,
|
||||
'Vacant' AS dsm_name,
|
||||
'Vacant' AS mr_kcode,
|
||||
'Vacant' AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
table Dim_Original_Col_AIA
|
||||
lineageTag: 10007bd6-7a54-472a-a9a2-6945502e4804
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 9b37b7dc-6b84-472e-9fde-ce27bd739908
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 2f3635e3-2c32-42fe-ba01-565e20b04bf3
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1
|
||||
dataType: string
|
||||
lineageTag: 0b497f96-c256-453e-a981-f23b3181dec1
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC1
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2
|
||||
dataType: string
|
||||
lineageTag: 73ac02c3-3726-4d50-86dd-2e5d98310f9c
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC2
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3
|
||||
dataType: string
|
||||
lineageTag: 77203747-dd6f-47ad-af34-1171b85949c9
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC3
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4
|
||||
dataType: string
|
||||
lineageTag: 3f99d6ad-f2a1-44a4-b854-138e4f2661ad
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC4
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_prd_cd
|
||||
dataType: string
|
||||
lineageTag: ea0f3cce-57dd-4d6d-b22f-2fd03ebc68ba
|
||||
summarizeBy: none
|
||||
sourceColumn: org_prd_cd
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_mole_nm_c
|
||||
dataType: string
|
||||
lineageTag: 90d2ad6a-314b-4527-86a5-a6f18fd1ffbd
|
||||
summarizeBy: none
|
||||
sourceColumn: org_mole_nm_c
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_manu_prd_nm_c
|
||||
dataType: string
|
||||
lineageTag: 827221d3-e825-4620-9846-8fc64cbc5d73
|
||||
summarizeBy: none
|
||||
sourceColumn: org_manu_prd_nm_c
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_prd_nm_c
|
||||
dataType: string
|
||||
lineageTag: 5a67b69a-e485-450c-8849-8baa1c9af57f
|
||||
summarizeBy: none
|
||||
sourceColumn: org_prd_nm_c
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_pk
|
||||
dataType: string
|
||||
lineageTag: 3940ddff-b49f-4799-a585-302eb80b5dbf
|
||||
summarizeBy: none
|
||||
sourceColumn: org_pk
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_prd_str
|
||||
dataType: string
|
||||
lineageTag: d8935814-aa88-4894-b574-355972a85488
|
||||
summarizeBy: none
|
||||
sourceColumn: org_prd_str
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_pth
|
||||
dataType: string
|
||||
lineageTag: bf06afdc-ae92-4a2a-9e6f-8ec369f0f188
|
||||
summarizeBy: none
|
||||
sourceColumn: org_pth
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column min_pk_unit
|
||||
dataType: string
|
||||
lineageTag: e1126e1f-e911-4f6e-9ca9-1878b85154ba
|
||||
summarizeBy: none
|
||||
sourceColumn: min_pk_unit
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_pk_unit
|
||||
dataType: string
|
||||
lineageTag: a3bc3010-dc9e-4f9b-a7c2-e8c40b3d2722
|
||||
summarizeBy: none
|
||||
sourceColumn: org_pk_unit
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column org_manu_nm
|
||||
dataType: string
|
||||
lineageTag: 975eb300-f50c-4938-91dd-a872693ce429
|
||||
summarizeBy: none
|
||||
sourceColumn: org_manu_nm
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = ```
|
||||
[PACK_COD] & [DATA_SOURCE]
|
||||
```
|
||||
lineageTag: e9af8c18-8173-4ec0-8c97-b19ca8df7822
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Original_Col_AIA = m
|
||||
mode: import
|
||||
queryGroup: 'OLD\AIA 独有表'
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT PACK_COD, DATA_SOURCE, ATC1, ATC2, ATC3, ATC4, org_prd_cd, org_mole_nm_c, org_manu_prd_nm_c, org_prd_nm_c, org_pk, org_prd_str, org_pth, min_pk_unit, org_pk_unit, org_manu_nm
|
||||
FROM DM.dm_td_aia_original_col
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,931 @@
|
||||
table Dim_PackInfo
|
||||
lineageTag: f420be02-8dc1-467f-8e0e-a8231e8b72e6
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 2fe29ac4-ec3b-42cb-86ce-17e060fec44f
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_DES
|
||||
dataType: string
|
||||
lineageTag: 58063e41-a010-4665-b743-4555f3a1abb4
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_DES
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_LCH
|
||||
dataType: string
|
||||
lineageTag: d93fc95d-29c0-4675-88cc-e26d87032d6d
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_LCH
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_COD
|
||||
dataType: string
|
||||
lineageTag: fb0d1cb1-2984-456e-8707-4cfebe4169ec
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES
|
||||
dataType: string
|
||||
lineageTag: 703c6908-b2f7-4b8e-a565-1d91e603dc0f
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: 254e868a-b297-4e27-b186-744ecb658faf
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_COD
|
||||
dataType: string
|
||||
lineageTag: b65462b8-5280-4819-8036-14d112376e9f
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES
|
||||
dataType: string
|
||||
lineageTag: 6cac86f3-c1f3-407e-9ae0-eceb64695b7b
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES_C
|
||||
dataType: string
|
||||
lineageTag: eff3f2c2-8119-4111-af35-5f8174133e2a
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_DES_C
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1_COD
|
||||
dataType: string
|
||||
lineageTag: 5de4d0d0-f003-4024-a369-081d4a5fd080
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC1_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1_DES
|
||||
dataType: string
|
||||
lineageTag: f02d78fd-d5df-4397-a894-8f114424385d
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC1_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1_DES_C
|
||||
dataType: string
|
||||
lineageTag: 7cbbfb49-2ca2-406d-8c00-fddf33b2c6e4
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC1_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2_COD
|
||||
dataType: string
|
||||
lineageTag: d908ea98-f389-43ab-8966-2706f25c9d5a
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC2_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2_DES
|
||||
dataType: string
|
||||
lineageTag: 688a385b-1d0c-45c6-a413-d7be0b988afe
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC2_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2_DES_C
|
||||
dataType: string
|
||||
lineageTag: ecef3c5f-149f-46c1-be65-71afea59b523
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC2_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3_COD
|
||||
dataType: string
|
||||
lineageTag: 8a726f1a-32b9-42ef-9f29-09c244c03cf3
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC3_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3_DES
|
||||
dataType: string
|
||||
lineageTag: 4ef7d78b-b807-4d0d-ae87-36aed8c6ff6d
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC3_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3_DES_C
|
||||
dataType: string
|
||||
lineageTag: 98f4fec7-f457-4b07-ac94-b07ddd3c88fc
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC3_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4_COD
|
||||
dataType: string
|
||||
lineageTag: 704ef81d-1d26-44c7-9d9d-3ac119e628c7
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC4_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4_DES
|
||||
dataType: string
|
||||
lineageTag: 4363ec7f-9e85-4090-a928-20af2c065002
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC4_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4_DES_C
|
||||
dataType: string
|
||||
lineageTag: 49efe84f-b9c1-44fb-bb66-6aac7e3cee31
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC4_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP1_COD
|
||||
dataType: string
|
||||
lineageTag: b3fdbbd8-cc0e-44a2-8bc3-74de2b77e64a
|
||||
summarizeBy: none
|
||||
sourceColumn: APP1_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP1_DES
|
||||
dataType: string
|
||||
lineageTag: 240c79e5-5336-42c4-ad35-ea1e615b128d
|
||||
summarizeBy: none
|
||||
sourceColumn: APP1_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP1_DES_C
|
||||
dataType: string
|
||||
lineageTag: dd56abcc-b68f-4b97-b1e2-ff1d292c8656
|
||||
summarizeBy: none
|
||||
sourceColumn: APP1_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP2_COD
|
||||
dataType: string
|
||||
lineageTag: dcf72800-3021-4ad2-a70f-f838a6e68012
|
||||
summarizeBy: none
|
||||
sourceColumn: APP2_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP2_DES
|
||||
dataType: string
|
||||
lineageTag: d04d2892-16be-4ebd-adcd-ce0f3c517527
|
||||
summarizeBy: none
|
||||
sourceColumn: APP2_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP2_DES_C
|
||||
dataType: string
|
||||
lineageTag: 8531419e-be46-4f02-9908-dc5fbab04158
|
||||
summarizeBy: none
|
||||
sourceColumn: APP2_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP3_COD
|
||||
dataType: string
|
||||
lineageTag: 52a1dea4-4dbb-44b6-9b79-9a285776c384
|
||||
summarizeBy: none
|
||||
sourceColumn: APP3_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP3_DES
|
||||
dataType: string
|
||||
lineageTag: aa57090b-6402-4c0d-a5ad-818e746ce79c
|
||||
summarizeBy: none
|
||||
sourceColumn: APP3_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP3_DES_C
|
||||
dataType: string
|
||||
lineageTag: 2b7ce819-150d-46aa-8bdb-05793fdde0db
|
||||
summarizeBy: none
|
||||
sourceColumn: APP3_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column GENE_ORIG_DESC
|
||||
dataType: string
|
||||
lineageTag: 7f805bf6-850d-4925-964d-015e6f7ea4fd
|
||||
summarizeBy: none
|
||||
sourceColumn: GENE_ORIG_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP_DESC
|
||||
dataType: string
|
||||
lineageTag: 72ac4722-00b5-49b3-adce-5153b1a464e1
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_COD
|
||||
dataType: string
|
||||
lineageTag: e3d5a1e0-d797-4022-84a7-ca5f19e39750
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column GEN_RN
|
||||
dataType: string
|
||||
lineageTag: 8b12411b-233e-4d8d-bb2b-a23d1b2893c0
|
||||
summarizeBy: none
|
||||
sourceColumn: GEN_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MOLECULE_CODE_DESC = IF([CMPS_DES] = "-"," - " , [CMPS_DES]& " - " & [CMPS_DES_C])
|
||||
lineageTag: 3527bbbc-a941-4357-b996-3161d6ae5a2d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1_CODE_DESC = [ATC1_COD] & " - " & [ATC1_DES_C]
|
||||
lineageTag: 95dfd568-a634-4ee6-93b7-b9eaad5fee0f
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2_CODE_DESC = [ATC2_COD] & " - " & [ATC2_DES_C]
|
||||
lineageTag: 08396fc1-0b78-48fa-af64-6e9aba7debd8
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3_CODE_DESC = [ATC3_COD] & " - " & [ATC3_DES_C]
|
||||
lineageTag: d2937c33-2fd4-4f4a-8d79-c4360bc318fd
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4_CODE_DESC = [ATC4_COD] & " - " & [ATC4_DES_C]
|
||||
lineageTag: e8147896-2b3d-4784-8af9-808f6f4e0807
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP1_COD_DES_C = [APP1_COD] & " - " & [APP1_DES_C]
|
||||
lineageTag: eaeaa2d6-77ad-4b2e-8875-32a8e69af1ad
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP2_COD_DES_C = [APP2_COD] & " - " & [APP2_DES_C]
|
||||
lineageTag: 5a58d6c4-f2a8-4acf-9c92-cd45836c81b5
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP3_COD_DES_C = [APP3_COD] & " - " & [APP3_DES_C]
|
||||
lineageTag: ca0b9bee-0c36-476c-b411-41338150964d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MOLECULE_DES_C = [CMPS_DES_C] & " - " & [CMPS_DES]
|
||||
lineageTag: e9eaccb6-c51f-459d-8bc0-15d15b0e98b8
|
||||
summarizeBy: none
|
||||
sortByColumn: CMPS_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_PACK = [PROD_DES] & " - " & [PACK_DES]
|
||||
lineageTag: 4b881842-d882-4f6d-b879-34b69bc0a5dd
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_CORP = [CORP_DES] & "(" & [PROD_DES]&")"
|
||||
lineageTag: c781d692-765e-4f49-9945-eac15e0f41e4
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_DES
|
||||
dataType: string
|
||||
lineageTag: d8dc8bf5-0104-4acc-b3b7-1f97e88dde0d
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_DES_C
|
||||
dataType: string
|
||||
lineageTag: 94a183de-e511-4b7a-b71e-1214f25538a3
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_CORP_C = [PROD_DES_C] & "(" & [CORP_DES_C]&")"
|
||||
lineageTag: c800e12c-120a-4f7f-a34c-9cd432a66a4b
|
||||
summarizeBy: none
|
||||
sortByColumn: PROD_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MANU_DES
|
||||
dataType: string
|
||||
lineageTag: 891e1902-4bc3-4512-9381-a11f03dc8af5
|
||||
summarizeBy: none
|
||||
sourceColumn: MANU_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_RN
|
||||
dataType: string
|
||||
lineageTag: 04e027ce-98d3-4d89-b8a7-0952fad4f687
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_RN
|
||||
dataType: string
|
||||
lineageTag: 12a207d7-e23f-4b08-b4c5-d91825f5003e
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_PACK_CORP = [PROD_DES_C] & " " & [PACK_DES]& "(" & [CORP_DES_C]&")"
|
||||
lineageTag: 990697ca-2f91-4375-b79c-2d412bf92652
|
||||
summarizeBy: none
|
||||
sortByColumn: PACK_RN
|
||||
|
||||
changedProperty = SortByColumn
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_RN
|
||||
dataType: string
|
||||
lineageTag: c7289ec0-4351-47e3-b711-3f2a24f4cbdd
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_RN
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 65bd749b-1888-4022-87e2-e04c2f68ebc5
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = ```
|
||||
[PACK_COD] & [DATA_SOURCE] & [NEW_CODE]
|
||||
```
|
||||
lineageTag: edc6d470-39af-4bd9-bd1b-76a8c703ad23
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column STGH_DES
|
||||
dataType: string
|
||||
lineageTag: 7af92276-177a-4f3c-908e-cdbb55f1e263
|
||||
summarizeBy: none
|
||||
sourceColumn: STGH_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column BIO_DESC
|
||||
dataType: string
|
||||
lineageTag: ba2d591e-23e5-4876-802c-786d1c4a02e9
|
||||
summarizeBy: none
|
||||
sourceColumn: BIO_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ETH_OTC_DESC
|
||||
dataType: string
|
||||
lineageTag: 43d019d0-858d-49cf-9309-79e73e1b3ab9
|
||||
summarizeBy: none
|
||||
sourceColumn: ETH_OTC_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NRDL_DESC
|
||||
dataType: string
|
||||
lineageTag: d9473b87-f987-4314-a595-7f3e21f7a7af
|
||||
summarizeBy: none
|
||||
sourceColumn: NRDL_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NRDL_ENTRY_DATE
|
||||
dataType: string
|
||||
lineageTag: d85ebc8a-ce77-4d40-9d3e-b579ba9c3726
|
||||
summarizeBy: none
|
||||
sourceColumn: NRDL_ENTRY_DATE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column EDL_DESC
|
||||
dataType: string
|
||||
lineageTag: a9f3707a-6f6c-4c22-aae7-3f89bb72e3e8
|
||||
summarizeBy: none
|
||||
sourceColumn: EDL_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TCM_DESC
|
||||
dataType: string
|
||||
lineageTag: b7d1757a-dac5-44b2-8250-be28e33330e2
|
||||
summarizeBy: none
|
||||
sourceColumn: TCM_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PAED_DESC
|
||||
dataType: string
|
||||
lineageTag: aa6ff961-ad17-4a2e-bfcc-8978247015f2
|
||||
summarizeBy: none
|
||||
sourceColumn: PAED_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column GQCE_DESC
|
||||
dataType: string
|
||||
lineageTag: 6e5f859b-63c0-4863-8d3d-08b10af5eaba
|
||||
summarizeBy: none
|
||||
sourceColumn: GQCE_DESC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MANU_COD
|
||||
dataType: string
|
||||
lineageTag: 64df9695-aa3d-445c-934f-9331fb3e7495
|
||||
summarizeBy: none
|
||||
sourceColumn: MANU_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MNFL_COD
|
||||
dataType: string
|
||||
lineageTag: e2bd7f82-e90f-4bf2-a9b0-fdaf2f929669
|
||||
summarizeBy: none
|
||||
sourceColumn: MNFL_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP_BATCH
|
||||
dataType: string
|
||||
lineageTag: a7cd1c88-73b3-4ee3-ba8d-f6b9f19fc053
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP_BATCH
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP_IMPLEMENTING_TIME
|
||||
dataType: string
|
||||
lineageTag: c14e7f12-4f6d-4eb5-b579-ae212f3c1f9b
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP_IMPLEMENTING_TIME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC
|
||||
dataType: string
|
||||
lineageTag: 685c7c74-076b-473d-8bcb-36e463db339b
|
||||
summarizeBy: none
|
||||
sourceColumn: ATC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NEW_CODE
|
||||
dataType: string
|
||||
lineageTag: b104776c-f0a4-43f7-bede-73bff24b0c09
|
||||
summarizeBy: none
|
||||
sourceColumn: NEW_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column COMMON_NAME
|
||||
dataType: string
|
||||
lineageTag: 11ab4733-a410-407b-9916-c77b59821e17
|
||||
summarizeBy: none
|
||||
sourceColumn: COMMON_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PRODUCT_NAME
|
||||
dataType: string
|
||||
lineageTag: 11043a28-b76c-4c5a-9f07-895f22721e87
|
||||
summarizeBy: none
|
||||
sourceColumn: PRODUCT_NAME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MANU_DES_XIEHE
|
||||
dataType: string
|
||||
lineageTag: 1c72ae6d-abac-40d4-ab4d-c56663c1187e
|
||||
summarizeBy: none
|
||||
sourceColumn: MANU_DES_XIEHE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_DES_XIEHE
|
||||
dataType: string
|
||||
lineageTag: 3772d845-a962-4ceb-9e5e-865188a5cbbb
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_DES_XIEHE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DRUG_DELIVERY_ROUTE
|
||||
dataType: string
|
||||
lineageTag: 2a43e243-63d3-46b8-9609-8d4ae1103245
|
||||
summarizeBy: none
|
||||
sourceColumn: DRUG_DELIVERY_ROUTE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column NFC
|
||||
dataType: string
|
||||
lineageTag: 06a7141c-139e-4450-9984-e8c9c2e407fe
|
||||
summarizeBy: none
|
||||
sourceColumn: NFC
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_TYPE
|
||||
dataType: string
|
||||
lineageTag: b0fc0260-0803-4528-a425-4ef5836a6378
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column LAUNCHTIME
|
||||
dataType: string
|
||||
lineageTag: b04aa76a-f488-4396-ab8b-25cd35b5e0db
|
||||
summarizeBy: none
|
||||
sourceColumn: LAUNCHTIME
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_VBP = [PROD_DES_C] & "(" & [VBP_BRAND]&")"
|
||||
lineageTag: 3ac4bcbe-deab-40cc-ae2c-2284761b7d94
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MANU_DES_C
|
||||
dataType: string
|
||||
lineageTag: 88125f10-9755-4d68-975c-4f0fe9f670af
|
||||
summarizeBy: none
|
||||
sourceColumn: MANU_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MOLECULE_SOURCE = [CMPS_DES] & [DATA_SOURCE]
|
||||
lineageTag: a6c0b55a-e20a-41c1-8e2a-ea8ebdcce51d
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE_AUTH = [PACK_COD] & [DATA_SOURCE]
|
||||
lineageTag: fd424c49-1925-4ea9-9a91-49693c20f53a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MANU_C = ```
|
||||
[CORP_DES_C]
|
||||
```
|
||||
lineageTag: 6dd9a1e4-a6eb-4530-a8a9-53b495d6188a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column Data_Surce2 =
|
||||
|
||||
IF([DATA_SOURCE] = "THC(Quarterly)","THC")
|
||||
lineageTag: cc0ecd7a-e99d-4554-8706-494e26b155a8
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column VBP_BRAND
|
||||
dataType: string
|
||||
lineageTag: 0d4070ed-40b3-4040-b940-3f8817716f50
|
||||
summarizeBy: none
|
||||
sourceColumn: VBP_BRAND
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_CORP_EN = [PROD_DES] & "(" & [CORP_DES]&")"
|
||||
lineageTag: 3f4e8882-261b-4f5e-87d5-c937d3bfc839
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_PACK_CORP_EN = [PROD_DES] & "-" & [PACK_DES]& "(" & [CORP_DES]&")"
|
||||
lineageTag: 7b021f40-cc80-4fca-b194-dc8c117cc0ab
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_VBP_EN = [PROD_DES] & "(" & [VBP_BRAND]&")"
|
||||
lineageTag: f9340cc0-8601-4b9d-8231-0c07f6e408a9
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP1_COD_DES = [APP1_COD] & " - " & [APP1_DES]
|
||||
lineageTag: ea41a7f4-7a3f-4072-baa0-c9ae77de2b3a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP2_COD_DES = [APP2_COD] & " - " & [APP2_DES]
|
||||
lineageTag: 55856921-d3c3-4b23-bb34-a5ff9eed6a83
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column APP3_COD_DES = [APP3_COD] & " - " & [APP3_DES]
|
||||
lineageTag: e1410049-e27b-4ecb-b70f-604285fa986c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC1_CODE_DESC_EN = [ATC1_COD] & " - " & [ATC1_DES]
|
||||
lineageTag: 5f6ad3a8-63cc-469c-bc3e-cc5cdc02c474
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC2_CODE_DESC_EN = [ATC2_COD] & " - " & [ATC2_DES]
|
||||
lineageTag: bc49d8e8-3f57-4ef8-b989-5db5fd0e869a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC3_CODE_DESC_EN = [ATC3_COD] & " - " & [ATC3_DES]
|
||||
lineageTag: cfc7c2ec-66ef-40f6-9410-e884d6e0dbfa
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ATC4_CODE_DESC_EN = [ATC4_COD] & " - " & [ATC4_DES]
|
||||
lineageTag: f4c0292a-91d1-47e5-9671-f5b87a72649b
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C_S
|
||||
dataType: string
|
||||
lineageTag: c2a0347a-d4ed-45b6-995c-c6c0a638cbcd
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C_S
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_S
|
||||
dataType: string
|
||||
lineageTag: c1f98745-7939-41f4-9726-71c68b2eae7d
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_S
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_PackInfo = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
with dim_pack (
|
||||
select CMPS_COD,min(CMPS_DES_C) CMPS_DES_C, min(CMPS_RN) CMPS_RN
|
||||
from dm.DM_TD_EXTERNAL_PACKINFO group by 1
|
||||
),
|
||||
|
||||
dim_manu as (
|
||||
select PACK_COD,DATA_SOURCE,max(MANU_DES_C) MANU_DES_C
|
||||
from DM.dm_td_external_packinfo_temp2
|
||||
group by 1,2)
|
||||
,result (
|
||||
SELECT
|
||||
DISTINCT A.PACK_COD,
|
||||
PACK_DES,
|
||||
PACK_LCH,
|
||||
A.PROD_COD,
|
||||
A.PROD_DES,
|
||||
PROD_DES_C,
|
||||
A.CMPS_COD,
|
||||
case when A.CMPS_DES is null or A.CMPS_DES='' then '-' else upper(A.CMPS_DES) end as CMPS_DES,
|
||||
case when B.CMPS_DES_C is null or B.CMPS_DES_C='' then '-' else upper(B.CMPS_DES_C) end as CMPS_DES_C,
|
||||
A.VBP_BATCH,
|
||||
A.VBP_IMPLEMENTING_TIME,
|
||||
STGH_DES,
|
||||
BIO_DESC,
|
||||
ETH_OTC_DESC,
|
||||
NRDL_DESC,
|
||||
NRDL_ENTRY_DATE,
|
||||
EDL_DESC,
|
||||
TCM_DESC,
|
||||
A.PAED_DESC,
|
||||
GQCE_DESC,
|
||||
MANU_COD,
|
||||
MANU_DES,
|
||||
MNFL_COD,
|
||||
ATC1_COD,
|
||||
ATC1_DES,
|
||||
ATC1_DES_C,
|
||||
ATC2_COD,
|
||||
C.MANU_DES_C,
|
||||
ATC2_DES,
|
||||
ATC2_DES_C,
|
||||
ATC3_COD,
|
||||
ATC3_DES,
|
||||
ATC3_DES_C,
|
||||
ATC4_COD,
|
||||
ATC4_DES,
|
||||
ATC4_DES_C,
|
||||
APP1_COD,
|
||||
APP1_DES,
|
||||
APP1_DES_C,
|
||||
APP2_COD,
|
||||
APP2_DES,
|
||||
APP2_DES_C,
|
||||
APP3_COD,
|
||||
APP3_DES,
|
||||
APP3_DES_C,
|
||||
GENE_ORIG_DESC,
|
||||
VBP_DESC,
|
||||
VBP_BRAND,
|
||||
CORP_COD,
|
||||
GEN_RN,
|
||||
CORP_DES,
|
||||
CORP_DES_C,
|
||||
PACK_RN,
|
||||
PROD_RN,
|
||||
B.CMPS_RN,
|
||||
A.DATA_SOURCE,
|
||||
ATC,
|
||||
NEW_CODE,
|
||||
COMMON_NAME,
|
||||
PRODUCT_NAME,
|
||||
MANU_DES_XIEHE,
|
||||
PACK_DES_XIEHE,
|
||||
DRUG_DELIVERY_ROUTE,
|
||||
NFC,
|
||||
CORP_TYPE,
|
||||
LAUNCHTIME
|
||||
FROM
|
||||
DM.DM_TD_EXTERNAL_PACKINFO A
|
||||
left join dim_pack B ON A.CMPS_COD = B.CMPS_COD
|
||||
left join dim_manu C ON A.PACK_COD = C.PACK_COD and A.DATA_SOURCE = C.DATA_SOURCE
|
||||
union all
|
||||
select
|
||||
'DTPOTHERS' PACK_COD
|
||||
,'DTPOTHERS' PACK_DES
|
||||
,'Y2005M03' PACK_LCH
|
||||
,'DTPOTHERS' PROD_COD
|
||||
,'DTPOTHERS' PROD_DES
|
||||
,'DTPOTHERS' as PROD_DES_C
|
||||
,'DTPOTHERS' as CMPS_COD
|
||||
,'DTPOTHERS' as CMPS_DES
|
||||
,'DTPOTHERS' as CMPS_DES_C
|
||||
,'DTPOTHERS' as VBP_BATCH
|
||||
,'DTPOTHERS' as VBP_IMPLEMENTING_TIME
|
||||
,'DTPOTHERS' as STGH_DES
|
||||
,'DTPOTHERS' as BIO_DESC
|
||||
,'DTPOTHERS' as ETH_OTC_DESC
|
||||
,'DTPOTHERS' as NRDL_DESC
|
||||
,'DTPOTHERS' as NRDL_ENTRY_DATE
|
||||
,'DTPOTHERS' as EDL_DESC
|
||||
,'DTPOTHERS' as TCM_DESC
|
||||
,'DTPOTHERS' as PAED_DESC
|
||||
,'DTPOTHERS' as GQCE_DESC
|
||||
,'DTPOTHERS' as MANU_COD
|
||||
,'DTPOTHERS' as MANU_DES
|
||||
,'DTPOTHERS' as MNFL_COD
|
||||
,'L' as ATC1_COD
|
||||
,'ANTINEOPLAST+IMMUNOMODUL' as ATC1_DES
|
||||
,'抗肿瘤药及免疫调节剂' as ATC1_DES_C
|
||||
,'L01' as ATC2_COD
|
||||
,'' MANU_DESC_C
|
||||
,'ANTINEOPLASTICS' as ATC2_DES
|
||||
,'抗肿瘤药' as ATC2_DES_C
|
||||
,'DTPOTHERS' as ATC3_COD
|
||||
,'DTPOTHERS' as ATC3_DES
|
||||
,'DTPOTHERS' as ATC3_DES_C
|
||||
,'DTPOTHERS' as ATC4_COD
|
||||
,'DTPOTHERS' as ATC4_DES
|
||||
,'DTPOTHERS' as ATC4_DES_C
|
||||
,'DTPOTHERS' as APP1_COD
|
||||
,'DTPOTHERS' as APP1_DES
|
||||
,'DTPOTHERS' as APP1_DES_C
|
||||
,'DTPOTHERS' as APP2_COD
|
||||
,'DTPOTHERS' as APP2_DES
|
||||
,'DTPOTHERS' as APP2_DES_C
|
||||
,'DTPOTHERS' as APP3_COD
|
||||
,'DTPOTHERS' as APP3_DES
|
||||
,'DTPOTHERS' as APP3_DES_C
|
||||
,'DTPOTHERS' as GENE_ORIG_DESC
|
||||
,'DTPOTHERS' as VBP_DESC
|
||||
,'VBP-IN' as VBP_BRAND
|
||||
,'DTPOTHERS' as CORP_COD
|
||||
,'DTPOTHERS' as GEN_RN
|
||||
,'DTPOTHERS' as CORP_DES
|
||||
,'DTPOTHERS' as CORP_DES_C
|
||||
,'DTPOTHERS' as PACK_RN
|
||||
,'DTPOTHERS' as PROD_RN
|
||||
,'DTPOTHERS' as CMPS_RN
|
||||
,'DTP(Quarterly)' as DATA_SOURCE
|
||||
,NULL as ATC
|
||||
,'' as NEW_CODE
|
||||
,NULL as COMMON_NAME
|
||||
,NULL as PRODUCT_NAME
|
||||
,NULL as MANU_DES_XIEHE
|
||||
,NULL as PACK_DES_XIEHE
|
||||
,NULL as DRUG_DELIVERY_ROUTE
|
||||
,NULL as NFC
|
||||
,'MNC' as CORP_TYPE
|
||||
,NULL as LAUNCHTIME)
|
||||
|
||||
select t1.*
|
||||
,if( t2.prod_cod is not null , concat(t1.PROD_DES_C,'(',t1.prod_cod,')(',t1.cmps_cod,')'),t1.PROD_DES_C) as PROD_DES_C_S
|
||||
,if( t2.prod_cod is not null , concat(t1.PROD_DES,'(',t1.prod_cod,')(',t1.cmps_cod,')'),t1.PROD_DES) as PROD_DES_S
|
||||
from result t1
|
||||
left join dm.dm_td_exchange_packinfo_m_prod t2 on t1.prod_cod = t2.prod_cod and t1.cmps_cod = t2.cmps_cod and t1.data_source = t2.data_source
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
table Dim_PackInfo_Retail
|
||||
lineageTag: b0655c42-285d-44c4-b17d-1d8e0253e10d
|
||||
|
||||
column product_id
|
||||
dataType: string
|
||||
lineageTag: 09fd3dac-2f11-4f8a-ba1e-76d73f14ae99
|
||||
summarizeBy: none
|
||||
sourceColumn: product_id
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column iqvia_pack_code
|
||||
dataType: string
|
||||
lineageTag: 059a8601-5c87-41d7-b527-cc60b94c59a3
|
||||
summarizeBy: none
|
||||
sourceColumn: iqvia_pack_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column prescription_nature
|
||||
dataType: string
|
||||
lineageTag: 05b398db-6f6d-4498-9965-79e71b8eb622
|
||||
summarizeBy: none
|
||||
sourceColumn: prescription_nature
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column medicine_type
|
||||
dataType: string
|
||||
lineageTag: 195c1d06-fc75-4584-bb52-1c2a9036f3f6
|
||||
summarizeBy: none
|
||||
sourceColumn: medicine_type
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_medicine_tier1
|
||||
dataType: string
|
||||
lineageTag: c60a1bf2-d42c-4973-a3e2-206ecdecbd0b
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_medicine_tier1
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_medicine_tier2
|
||||
dataType: string
|
||||
lineageTag: bc15beb2-dd7b-4ed2-b550-cbc0e2268a1e
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_medicine_tier2
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_medicine_tier3
|
||||
dataType: string
|
||||
lineageTag: 9e9e36f2-a346-4ede-bd67-7677a2e91fb6
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_medicine_tier3
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_medicine_tier4
|
||||
dataType: string
|
||||
lineageTag: fa02309d-f254-46c4-b3be-38ec728f1fde
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_medicine_tier4
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column common_name
|
||||
dataType: string
|
||||
lineageTag: a5acb45a-e843-428e-a857-0d3b70125091
|
||||
summarizeBy: none
|
||||
sourceColumn: common_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column dosage_form
|
||||
dataType: string
|
||||
lineageTag: 6c9c6da5-f19b-4ffb-a670-9330336e3282
|
||||
summarizeBy: none
|
||||
sourceColumn: dosage_form
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column user_type
|
||||
dataType: string
|
||||
lineageTag: 7d4e57ef-7b34-4f5c-a81a-258df46e84ed
|
||||
summarizeBy: none
|
||||
sourceColumn: user_type
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column category_name
|
||||
dataType: string
|
||||
lineageTag: aff8df22-d9ae-4fd6-92b4-08c6b5702060
|
||||
summarizeBy: none
|
||||
sourceColumn: category_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column product_name
|
||||
dataType: string
|
||||
lineageTag: 8afd7257-d8c6-4c0b-9b8c-e60ab403b5e9
|
||||
summarizeBy: none
|
||||
sourceColumn: product_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column brand_name
|
||||
dataType: string
|
||||
lineageTag: 5a4651ef-0bae-4548-9a1f-bce1d5184a83
|
||||
summarizeBy: none
|
||||
sourceColumn: brand_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_manu_des
|
||||
dataType: string
|
||||
lineageTag: aea34570-21b9-492b-b1a1-23e046c89984
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_manu_des
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_corp_des
|
||||
dataType: string
|
||||
lineageTag: 3bdc6d45-39d3-456d-91cf-a5e42a687141
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_corp_des
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column zk_pack_des
|
||||
dataType: string
|
||||
lineageTag: 9f91ed0c-cd5e-4884-97fd-58aee00a26e7
|
||||
summarizeBy: none
|
||||
sourceColumn: zk_pack_des
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: f9ecf473-aed1-4a76-a71a-d9dfefb9b512
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = [iqvia_pack_code] & [DATA_SOURCE]
|
||||
lineageTag: 59712599-b98f-4868-a21b-88bc9199057a
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_PackInfo_Retail = m
|
||||
mode: import
|
||||
queryGroup: OLD\FreeReport独有表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT product_id,iqvia_pack_code,prescription_nature,medicine_type,zk_medicine_tier1,zk_medicine_tier2,zk_medicine_tier3,zk_medicine_tier4,common_name,dosage_form,user_type,category_name,product_name,
|
||||
brand_name,zk_manu_des,zk_corp_des,zk_pack_des,'Retail(Quarterly)' DATA_SOURCE
|
||||
FROM DM.dm_zk_retail_product_info
|
||||
union all
|
||||
SELECT product_id,iqvia_pack_code,prescription_nature,medicine_type,zk_medicine_tier1,zk_medicine_tier2,zk_medicine_tier3,zk_medicine_tier4,common_name,dosage_form,user_type,category_name,product_name,
|
||||
brand_name,zk_manu_des,zk_corp_des,zk_pack_des,'EC(Monthly)' DATA_SOURCE
|
||||
FROM DM.dm_zk_retail_product_info
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
table Dim_PackInfo_Total
|
||||
lineageTag: 8bea7a10-d14d-4c7a-8199-365d12811eca
|
||||
|
||||
column PACK_COD
|
||||
dataType: string
|
||||
lineageTag: 9323e255-439d-43d7-8bcc-e0899fab0f01
|
||||
summarizeBy: none
|
||||
sourceColumn: PACK_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES_C
|
||||
dataType: string
|
||||
lineageTag: c097148e-55ca-4597-a5ee-3142502af376
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES
|
||||
dataType: string
|
||||
lineageTag: d7694869-02b8-4733-93a6-aaca93dc73ad
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CMPS_DES_C
|
||||
dataType: string
|
||||
lineageTag: 330a9441-8678-47aa-973e-c5102a3f8102
|
||||
summarizeBy: none
|
||||
sourceColumn: CMPS_DES_C
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_COD
|
||||
dataType: string
|
||||
lineageTag: a77008b0-44ca-4761-9b7f-0d1c3c3184db
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column CORP_DES
|
||||
dataType: string
|
||||
lineageTag: 9cf44325-1c29-49cb-8e37-ea67bbaec653
|
||||
summarizeBy: none
|
||||
sourceColumn: CORP_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PROD_DES
|
||||
dataType: string
|
||||
lineageTag: 33ecc8f4-4eed-4804-ac37-d913405ac8ff
|
||||
summarizeBy: none
|
||||
sourceColumn: PROD_DES
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: ce1d238c-51e3-4839-81c1-491ef8b93747
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PACK_SOURCE = [PACK_COD] & [DATA_SOURCE]
|
||||
lineageTag: 7920d032-e4d9-4440-97e1-afe0dd301efa
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_PackInfo_Total = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT PACK_COD,PROD_DES,PROD_DES_C,CMPS_DES,CMPS_DES_C,CORP_COD,CORP_DES,DATA_SOURCE
|
||||
|
||||
FROM DM.DM_TD_EXTERNAL_PACKINFO
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
table Dim_Platform
|
||||
lineageTag: 09722c28-8ac3-4435-8ecd-280f532dc58f
|
||||
|
||||
column PLATFORM_TYPE
|
||||
dataType: string
|
||||
lineageTag: 687c6978-e9d4-41c1-8fd7-c2780a381d65
|
||||
summarizeBy: none
|
||||
sourceColumn: PLATFORM_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: d3465f97-2b24-4fa1-8e1d-63315621dc49
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM
|
||||
dataType: string
|
||||
lineageTag: 172cc61d-f669-4c4b-bee7-058ad5526aba
|
||||
summarizeBy: none
|
||||
sourceColumn: PLATFORM
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM_TYPE_SOURCE = [PLATFORM_TYPE] & [DATA_SOURCE]
|
||||
lineageTag: ddf3b915-ce38-4381-87ef-afc3967ca14f
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM_EN = SWITCH([PLATFORM],"京东", "JD", "天猫", "Tmall")
|
||||
lineageTag: 6c380f91-7840-406e-bb90-3c72029fb864
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_Platform = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT DATA_SOURCE,B.PLATFORM,CASE WHEN A.DATA_SOURCE = 'EC(Monthly)' THEN B.PLATFORM ELSE '' END PLATFORM_TYPE
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
INNER JOIN (SELECT DISTINCT PLATFORM_TYPE PLATFORM FROM DM.DM_TF_EXTERNAL_SALES WHERE PLATFORM_TYPE <> '') B
|
||||
WHERE YYYYMM >= (date_format(now(), 'yyyy')-3)*100+1 "
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
table Dim_PlatformMID
|
||||
lineageTag: 1cd2fd49-62d1-49ca-ac98-218be929baae
|
||||
|
||||
column PLATFORM_TYPE
|
||||
dataType: string
|
||||
lineageTag: d3d8ea16-f1b2-41ae-b0a2-4678c075c65c
|
||||
summarizeBy: none
|
||||
sourceColumn: PLATFORM_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 2791225e-c0a7-421a-88e9-3abdc837d281
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PLATFORM_TYPE_SOURCE = [PLATFORM_TYPE] & [DATA_SOURCE]
|
||||
lineageTag: 411dc2e6-ab8a-4b60-a967-8b9ee8c94ed4
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_PlatformMID = m
|
||||
mode: import
|
||||
queryGroup: OLD\EXTERNAL_辅助表
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"SELECT DISTINCT PLATFORM_TYPE,DATA_SOURCE
|
||||
FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
WHERE YYYYMM >= (date_format(now(), 'yyyy')-3)*100+1 "
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Exception
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
table Dim_PrescriptionSource
|
||||
lineageTag: 953c3d2a-0eeb-4153-8348-907f82bf6413
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: fbf0b858-2561-4edf-a5e4-4de7b511fbbd
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PRESCRIPTION_SOURCE = [PRESCRIPTION_TYPE] & [DATA_SOURCE]
|
||||
lineageTag: 73cfe048-18e6-49af-9eb6-14879cf014ef
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column PRESCRIPTION_TYPE
|
||||
dataType: string
|
||||
lineageTag: 94eaea46-0a0d-42dd-b4be-3613754aa809
|
||||
summarizeBy: none
|
||||
sourceColumn: PRESCRIPTION_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_PrescriptionSource = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
SELECT DISTINCT A.PRESCRIPTION_SOURCE PRESCRIPTION_TYPE,A.DATA_SOURCE FROM DM.DM_TF_EXTERNAL_SALES A
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
604
External All Channel.SemanticModel/definition/tables/Dim_RC.tmdl
Normal file
604
External All Channel.SemanticModel/definition/tables/Dim_RC.tmdl
Normal file
@@ -0,0 +1,604 @@
|
||||
table Dim_RC
|
||||
lineageTag: 1631f019-12d8-4ce8-9ec5-d19584019a1c
|
||||
|
||||
column AUDIT_COD
|
||||
dataType: string
|
||||
lineageTag: 81757219-efcb-4aed-8d1e-467b9d6cb8ea
|
||||
summarizeBy: none
|
||||
sourceColumn: AUDIT_COD
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 52adb170-ce52-41f9-939e-1a0623de84b9
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column sub_bu_code_auth
|
||||
dataType: string
|
||||
lineageTag: a32a5889-f5fd-420a-9664-98552a7445c3
|
||||
summarizeBy: none
|
||||
sourceColumn: sub_bu_code_auth
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column bu_code_auth
|
||||
dataType: string
|
||||
lineageTag: 5983779e-253b-44ff-8821-8cf8988eb883
|
||||
summarizeBy: none
|
||||
sourceColumn: bu_code_auth
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DATA_SOURCE
|
||||
dataType: string
|
||||
lineageTag: 67a8d0c3-89b8-41b4-b599-e3bcb49ea7c2
|
||||
summarizeBy: none
|
||||
sourceColumn: DATA_SOURCE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column REGION_RATIO
|
||||
dataType: double
|
||||
lineageTag: aa78454a-8ca5-43e8-a7ce-766e0e8cbf11
|
||||
summarizeBy: sum
|
||||
sourceColumn: REGION_RATIO
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
annotation PBI_FormatHint = {"isGeneralNumber":true}
|
||||
|
||||
column mr_trty_code
|
||||
dataType: string
|
||||
lineageTag: ba35f7ca-6057-495f-b7c4-07f96205cfb5
|
||||
summarizeBy: none
|
||||
sourceColumn: mr_trty_code
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_TARGET_HP
|
||||
dataType: string
|
||||
lineageTag: b6cf7ae2-aac0-4fd4-ad84-9627010aed2f
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_TARGET_HP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SUB_CHANNEL
|
||||
dataType: string
|
||||
lineageTag: 007e5d6e-edcb-42d6-87c6-18dcfa713368
|
||||
summarizeBy: none
|
||||
sourceColumn: SUB_CHANNEL
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column DRAGON_FLAG
|
||||
dataType: string
|
||||
lineageTag: 44e65af1-9763-4e53-9f3a-d22d98152d0d
|
||||
summarizeBy: none
|
||||
sourceColumn: DRAGON_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column KA_FLAG
|
||||
dataType: string
|
||||
lineageTag: 487ffbbf-c28a-4170-890a-f5ffe5c67351
|
||||
summarizeBy: none
|
||||
sourceColumn: KA_FLAG
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column SUB_CHANNEL_ORDER
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: e546c2cc-7d17-4434-a5cf-ee615d732148
|
||||
summarizeBy: sum
|
||||
sourceColumn: SUB_CHANNEL_ORDER
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column AUDIT_SOURCE = [AUDIT_COD] & [DATA_SOURCE]
|
||||
lineageTag: a192af7e-e937-4681-ae25-b182b75880cd
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ISTARGET_SOURCE = [IS_TARGET_HP] & [DATA_SOURCE]
|
||||
lineageTag: da23e96b-509e-48b1-8d94-7869ff3aab9c
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column INS_MKT_SOURCE = IF([DATA_SOURCE] = "AIA(Monthly)", [AUDIT_COD] & [MARKET] & [DATA_SOURCE], [DATA_SOURCE])
|
||||
lineageTag: 1388a47e-f87f-424e-a757-3a2b6459f751
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
|
||||
lineageTag: 11476559-b491-4a7e-877c-b982ea203ee7
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column ORG_SOURCE = [AUDIT_COD] & [MARKET] & [region_code] & [DATA_SOURCE]
|
||||
lineageTag: 49ad814f-6284-4735-b152-28fbb0db8c0b
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column TRTY_SOURCE = ```
|
||||
[mr_trty_code] & [DATA_SOURCE]
|
||||
```
|
||||
lineageTag: e8bb1de3-eade-46e6-8b22-7265e3086b99
|
||||
summarizeBy: none
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column REGION_CODE
|
||||
dataType: string
|
||||
lineageTag: d3850675-3767-490d-a741-4705c031fe70
|
||||
summarizeBy: none
|
||||
sourceColumn: REGION_CODE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column rc_key
|
||||
dataType: string
|
||||
lineageTag: b1d21ad0-52f9-4b1b-9458-d313a51a0b79
|
||||
summarizeBy: none
|
||||
sourceColumn: rc_key
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column aia_remove
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: 5c935592-d33b-48ec-bd92-28b3830e14e8
|
||||
summarizeBy: sum
|
||||
sourceColumn: aia_remove
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_RC = m
|
||||
mode: import
|
||||
queryGroup: Dim
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
WITH
|
||||
dm_td_org_temp AS (
|
||||
SELECT
|
||||
org_key,
|
||||
mr_trty_tag,
|
||||
district_code,
|
||||
rsm_name,
|
||||
rc_name,
|
||||
p2.region_name,
|
||||
p2.rsd_kcode,
|
||||
p2.rsd_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_code = 'PC12' THEN 'PC09'
|
||||
ELSE p2.bu_code
|
||||
END bu_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_report = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_report
|
||||
END bu_report,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_code = 'NA27' THEN 'NA06'
|
||||
ELSE p2.sub_bu_code
|
||||
END sub_bu_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_name = 'EC' THEN 'Retail'
|
||||
ELSE p2.sub_bu_name
|
||||
END sub_bu_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.sub_bu_name_en = 'EC' THEN 'Retail'
|
||||
ELSE p2.sub_bu_name_en
|
||||
END sub_bu_name_en,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_name
|
||||
END bu_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name_en = 'EC' THEN 'Retail'
|
||||
ELSE p2.bu_name_en
|
||||
END bu_name_en,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.nsd_kcode = 'ND_EC0001_V' THEN 'KSGX559'
|
||||
ELSE p2.nsd_kcode
|
||||
END nsd_kcode,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bu_name = 'EC'
|
||||
AND p2.nsd_name = 'Vacant' THEN '李白杨'
|
||||
ELSE p2.nsd_name
|
||||
END nsd_name,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.nsd_trty_code = 'ND_EC0001' THEN 'ND_RT0001'
|
||||
ELSE p2.nsd_trty_code
|
||||
END nsd_trty_code,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bsd_kcode = 'VP_EC0001_V' THEN 'VP_RT0001_V'
|
||||
ELSE p2.bsd_kcode
|
||||
END bsd_kcode,
|
||||
CASE
|
||||
WHEN p2.yyyymm >= '202601'
|
||||
AND p2.bsd_trty_code = 'VP_EC0001' THEN 'VP_RT0001'
|
||||
ELSE p2.bsd_trty_code
|
||||
END bsd_trty_code,
|
||||
p2.rsm_kcode,
|
||||
p2.rc_code,
|
||||
p2.rc_name_en,
|
||||
p2.region_code,
|
||||
p2.region_name_en,
|
||||
BU_CATEGORY,
|
||||
yyyymm,
|
||||
mr_trty_code,
|
||||
mr_kcode,
|
||||
dsm_trty_code,
|
||||
rsm_trty_code,
|
||||
dsm_kcode,
|
||||
rsd_trty_code,
|
||||
district_name,
|
||||
dsm_name,
|
||||
mr_name
|
||||
FROM
|
||||
DM.dm_td_org P2
|
||||
WHERE
|
||||
yyyymm IN (
|
||||
SELECT
|
||||
key_value
|
||||
FROM
|
||||
dm.dm_td_date_config
|
||||
WHERE
|
||||
key_code = 'pfmc_cvh'
|
||||
)
|
||||
AND mr_trty_code <> ''
|
||||
),
|
||||
t1 AS (
|
||||
SELECT DISTINCT
|
||||
concat ('ROC_', nsd_trty_code) AS mr_trty_code,
|
||||
'ROC' AS bu_category,
|
||||
'ROC' AS bu_name_en,
|
||||
'ROC' AS sub_bu_name,
|
||||
'ROC' AS rc_code,
|
||||
'ROC' AS rc_name_en,
|
||||
'ROC' AS rc_name_en_n,
|
||||
'ROC' AS RC_NAME,
|
||||
'ROC' AS region_code,
|
||||
'ROC' AS region_name_en,
|
||||
'ROC' AS region_name_en_n,
|
||||
'ROC' AS team,
|
||||
nsd_kcode,
|
||||
nsd_name,
|
||||
'Vacant' AS rsd_kcode,
|
||||
'Vacant' AS rsd_name,
|
||||
'Vacant' AS rsm_kcode,
|
||||
'Vacant' AS rsm_name,
|
||||
'Vacant' AS dsm_kcode,
|
||||
'Vacant' AS dsm_name,
|
||||
'Vacant' AS mr_kcode,
|
||||
'Vacant' AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
),
|
||||
t2 AS (
|
||||
SELECT DISTINCT
|
||||
mr_trty_code,
|
||||
bu_category,
|
||||
bu_name_en,
|
||||
sub_bu_name,
|
||||
rc_code,
|
||||
rc_name AS rc_name_en,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS RC_NAME,
|
||||
region_code,
|
||||
region_name AS region_name_en,
|
||||
district_name AS team,
|
||||
nsd_kcode,
|
||||
CASE
|
||||
WHEN nsd_name = 'Vacant' THEN nsd_kcode
|
||||
ELSE nsd_name
|
||||
END AS nsd_name,
|
||||
rsd_kcode,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS rsd_name,
|
||||
rsm_kcode,
|
||||
CASE
|
||||
WHEN rsm_name = 'Vacant' THEN rsm_kcode
|
||||
ELSE rsm_name
|
||||
END AS rsm_name,
|
||||
dsm_kcode,
|
||||
CASE
|
||||
WHEN dsm_name = 'Vacant' THEN dsm_kcode
|
||||
ELSE dsm_name
|
||||
END AS dsm_name,
|
||||
mr_kcode,
|
||||
CASE
|
||||
WHEN mr_name = 'Vacant' THEN mr_kcode
|
||||
ELSE mr_name
|
||||
END AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
rsm_trty_code AS mr_trty_code,
|
||||
bu_category,
|
||||
bu_name_en,
|
||||
sub_bu_name,
|
||||
rc_code,
|
||||
rc_name AS rc_name_en,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS RC_NAME,
|
||||
region_code,
|
||||
region_name AS region_name_en,
|
||||
'' AS team,
|
||||
nsd_kcode,
|
||||
CASE
|
||||
WHEN nsd_name = 'Vacant' THEN nsd_kcode
|
||||
ELSE nsd_name
|
||||
END AS nsd_name,
|
||||
rsd_kcode,
|
||||
CASE
|
||||
WHEN rsd_name = 'Vacant' THEN rsd_kcode
|
||||
ELSE rsd_name
|
||||
END AS rsd_name,
|
||||
rsm_kcode,
|
||||
CASE
|
||||
WHEN rsm_name = 'Vacant' THEN rsm_kcode
|
||||
ELSE rsm_name
|
||||
END AS rsm_name,
|
||||
'' AS dsm_kcode,
|
||||
'' AS dsm_name,
|
||||
'' AS mr_kcode,
|
||||
'' AS mr_name
|
||||
FROM
|
||||
dm_td_org_temp
|
||||
UNION
|
||||
SELECT
|
||||
'Vacant' AS mr_trty_code,
|
||||
'ROC' AS bu_category,
|
||||
'ROC' AS bu_name_en,
|
||||
'ROC' AS sub_bu_name,
|
||||
'ROC' AS rc_code,
|
||||
'ROC' AS rc_name_en,
|
||||
'ROC' AS RC_NAME,
|
||||
'ROC' AS region_code,
|
||||
'ROC' AS region_name_en,
|
||||
'ROC' AS team,
|
||||
'Vacant' AS nsd_kcode,
|
||||
'Vacant' AS nsd_name,
|
||||
'Vacant' AS rsd_kcode,
|
||||
'Vacant' AS rsd_name,
|
||||
'Vacant' AS rsm_kcode,
|
||||
'Vacant' AS rsm_name,
|
||||
'Vacant' AS dsm_kcode,
|
||||
'Vacant' AS dsm_name,
|
||||
'Vacant' AS mr_kcode,
|
||||
'Vacant' AS mr_name
|
||||
),
|
||||
t3 AS (
|
||||
SELECT DISTINCT
|
||||
A.REGION_CODE,
|
||||
A.region_name_en,
|
||||
A.rc_code,
|
||||
A.rc_name_en,
|
||||
A.RegionCenter,
|
||||
A.AUDIT_COD,
|
||||
A.MARKET,
|
||||
CASE
|
||||
WHEN bu_category IN ('All Channel', 'EC')
|
||||
AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC'
|
||||
WHEN A.region_name_en = 'ROC' THEN 'ROC'
|
||||
WHEN A.rc_name_en = 'ROC' THEN 'ROC'
|
||||
ELSE bu_category
|
||||
END bu_category,
|
||||
CASE
|
||||
WHEN bu_category IN ('All Channel', 'EC')
|
||||
AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC'
|
||||
WHEN A.region_name_en = 'ROC' THEN 'ROC'
|
||||
WHEN A.rc_name_en = 'ROC' THEN 'ROC'
|
||||
ELSE bu_name_en
|
||||
END bu_name_en,
|
||||
CASE
|
||||
WHEN bu_category IN ('All Channel', 'EC')
|
||||
AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC'
|
||||
WHEN A.region_name_en = 'ROC' THEN 'ROC'
|
||||
WHEN A.rc_name_en = 'ROC' THEN 'ROC'
|
||||
ELSE sub_bu_name
|
||||
END sub_bu_name,
|
||||
sub_bu_code_auth,
|
||||
bu_code_auth,
|
||||
A.DATA_SOURCE,
|
||||
REGION_RATIO,
|
||||
CASE
|
||||
WHEN bu_category IN ('All Channel', 'EC')
|
||||
AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC'
|
||||
WHEN A.region_name_en = 'ROC' THEN 'ROC'
|
||||
ELSE RSM_Name
|
||||
END RSM_Name,
|
||||
CASE
|
||||
WHEN bu_category IN ('All Channel', 'EC')
|
||||
AND A.DATA_SOURCE = 'IQVIA-CHPA(Monthly)' THEN 'ROC'
|
||||
WHEN A.rc_name_en = 'ROC' THEN 'ROC'
|
||||
ELSE A.RC_Name
|
||||
END RC_Name,
|
||||
CASE
|
||||
WHEN A.region_name_en = 'ROC' THEN 2
|
||||
ELSE 1
|
||||
END REGION_RN,
|
||||
CASE
|
||||
WHEN A.rc_name_en = 'ROC' THEN 2
|
||||
ELSE 1
|
||||
END RC_RN,
|
||||
team,
|
||||
dsm_kcode,
|
||||
dsm_name,
|
||||
CASE
|
||||
WHEN A.mr_trty_code = '' THEN nvl (t1.mr_trty_code, 'Vacant')
|
||||
ELSE A.mr_trty_code
|
||||
END AS mr_trty_code,
|
||||
mr_kcode,
|
||||
mr_name,
|
||||
-- B.INST_CODE,NVL(B.inst_name,'') INST_NAME,B.INST_TYPE, B.INST_SUB_TYPE, B.org_level_desc INS_LEVEL,
|
||||
CASE
|
||||
WHEN (
|
||||
A.REGION_CODE = 'ROC'
|
||||
OR A.REGION_CODE = ''
|
||||
OR A.REGION_CODE IS NULL
|
||||
)
|
||||
AND A.DATA_SOURCE = 'AIA(Monthly)' THEN 'N'
|
||||
ELSE 'Y'
|
||||
END AS IS_TARGET_HP,
|
||||
--C.IS_TARGET_HP,
|
||||
C.SUB_CHANNEL,
|
||||
C.DRAGON_FLAG,
|
||||
C.KA_FLAG,
|
||||
C.SUB_CHANNEL_ORDER
|
||||
FROM
|
||||
dm.dm_td_external_org A
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
region_code,
|
||||
rc_code,
|
||||
mr_trty_code
|
||||
FROM
|
||||
t2
|
||||
WHERE
|
||||
team = ''
|
||||
) t1 ON A.region_code = t1.region_code
|
||||
AND A.RC_CODE = t1.rc_code -- left join dm.dm_td_institution B on A.AUDIT_COD = NVL(B.INST_CODE, 'ROC')
|
||||
LEFT JOIN dm.dm_aia_targethp_flag C ON A.AUDIT_COD = NVL (C.INST_CODE, 'ROC')
|
||||
AND A.DATA_SOURCE = C.DATA_SOURCE
|
||||
AND A.MARKET = C.MARKET
|
||||
),
|
||||
t4 (
|
||||
SELECT DISTINCT
|
||||
t3.REGION_CODE,
|
||||
t3.region_name_en,
|
||||
t3.rc_code,
|
||||
t3.rc_name_en,
|
||||
t3.RegionCenter,
|
||||
t3.AUDIT_COD,
|
||||
t3.MARKET,
|
||||
t3.bu_category,
|
||||
t3.bu_name_en,
|
||||
t3.sub_bu_name,
|
||||
t3.sub_bu_code_auth,
|
||||
t3.bu_code_auth,
|
||||
t3.DATA_SOURCE,
|
||||
t3.REGION_RATIO,
|
||||
t3.RSM_Name,
|
||||
t3.RC_Name,
|
||||
t3.REGION_RN,
|
||||
t3.RC_RN,
|
||||
t3.team,
|
||||
t3.dsm_kcode,
|
||||
t3.dsm_name,
|
||||
t1.mr_trty_code AS mr_trty_code,
|
||||
t3.mr_kcode,
|
||||
t3.mr_name,
|
||||
t3.IS_TARGET_HP,
|
||||
t3.SUB_CHANNEL,
|
||||
t3.DRAGON_FLAG,
|
||||
t3.KA_FLAG,
|
||||
t3.SUB_CHANNEL_ORDER
|
||||
FROM
|
||||
t3
|
||||
CROSS JOIN t1
|
||||
WHERE
|
||||
audit_cod = 'ROC'
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
t3.REGION_CODE,
|
||||
t3.region_name_en,
|
||||
t3.rc_code,
|
||||
t3.rc_name_en,
|
||||
t3.RegionCenter,
|
||||
t3.AUDIT_COD,
|
||||
t3.MARKET,
|
||||
t3.bu_category,
|
||||
t3.bu_name_en,
|
||||
t3.sub_bu_name,
|
||||
t3.sub_bu_code_auth,
|
||||
t3.bu_code_auth,
|
||||
t3.DATA_SOURCE,
|
||||
t3.REGION_RATIO,
|
||||
t3.RSM_Name,
|
||||
t3.RC_Name,
|
||||
t3.REGION_RN,
|
||||
t3.RC_RN,
|
||||
t3.team,
|
||||
t3.dsm_kcode,
|
||||
t3.dsm_name,
|
||||
t3.mr_trty_code,
|
||||
t3.mr_kcode,
|
||||
t3.mr_name,
|
||||
t3.IS_TARGET_HP,
|
||||
t3.SUB_CHANNEL,
|
||||
t3.DRAGON_FLAG,
|
||||
t3.KA_FLAG,
|
||||
t3.SUB_CHANNEL_ORDER
|
||||
FROM
|
||||
t3
|
||||
WHERE
|
||||
audit_cod <> 'ROC'
|
||||
)
|
||||
SELECT
|
||||
t4.*,
|
||||
if (t5.ins_code IS NULL, 1, 0) AS aia_remove
|
||||
FROM
|
||||
t4
|
||||
LEFT JOIN dm.dm_ext_aia_data_remove_flag t5 ON t4.market = t5.market
|
||||
AND t4.audit_cod = t5.ins_code
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
#"Removed Other Columns" = Table.SelectColumns(Source,{"REGION_CODE", "AUDIT_COD", "MARKET", "sub_bu_code_auth", "bu_code_auth", "DATA_SOURCE", "REGION_RATIO", "mr_trty_code", "IS_TARGET_HP", "SUB_CHANNEL", "DRAGON_FLAG", "KA_FLAG", "SUB_CHANNEL_ORDER", "aia_remove"}),
|
||||
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "rc_key", each [AUDIT_COD]&[DATA_SOURCE]&[MARKET])
|
||||
in
|
||||
#"Added Custom"
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
table Dim_RC_Merged_Data
|
||||
lineageTag: 96000f39-4333-4de0-aadd-89d481bc13a3
|
||||
|
||||
column KEY
|
||||
dataType: string
|
||||
lineageTag: ef40fbb2-e0cc-4dc2-bd87-b89ec8e48f89
|
||||
summarizeBy: none
|
||||
sourceColumn: KEY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column MARKET
|
||||
dataType: string
|
||||
lineageTag: 57d6ffb7-f7e5-4024-aee3-a4905383f349
|
||||
summarizeBy: none
|
||||
sourceColumn: MARKET
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_TARGET_HP
|
||||
dataType: string
|
||||
lineageTag: 98f47592-994c-4290-98f3-1a406bd5edbb
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_TARGET_HP
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_RC_Merged_Data = m
|
||||
mode: import
|
||||
queryGroup: OLD\非首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
"
|
||||
Select
|
||||
distinct
|
||||
concat( AUDIT_COD ,DATA_SOURCE ) KEY
|
||||
,MARKET
|
||||
,CASE WHEN (A.REGION_CODE ='ROC' OR A.REGION_CODE ='' OR A.REGION_CODE IS NULL ) AND A.DATA_SOURCE = 'AIA(Monthly)' THEN 'N' ELSE 'Y' END AS IS_TARGET_HP
|
||||
from DM.dm_td_external_org_merged_data A
|
||||
"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
)
|
||||
in
|
||||
Source
|
||||
```
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
table Dim_RegionType
|
||||
lineageTag: 6aa1d3be-7da3-480d-96ed-18f4d5839bbe
|
||||
|
||||
column REGION_TYPE
|
||||
dataType: string
|
||||
lineageTag: 8ed78a9a-bf64-495b-bfe8-39e8a5d4b77a
|
||||
summarizeBy: none
|
||||
sourceColumn: REGION_TYPE
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column region_name
|
||||
dataType: string
|
||||
lineageTag: a2623e17-4eca-4108-9086-31e65141735d
|
||||
summarizeBy: none
|
||||
sourceColumn: region_name
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column IS_HIDDEN_COUNTY
|
||||
dataType: string
|
||||
lineageTag: a6fe8b2d-feec-4282-9b75-4f0276a8bb58
|
||||
summarizeBy: none
|
||||
sourceColumn: IS_HIDDEN_COUNTY
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
partition Dim_RegionType = m
|
||||
mode: import
|
||||
queryGroup: OLD\首页
|
||||
source = ```
|
||||
let
|
||||
Source =
|
||||
Value.NativeQuery(
|
||||
Databricks.Catalogs(
|
||||
ServerAddress, HttpPath, [
|
||||
Catalog = CatalogName,
|
||||
Database = null,
|
||||
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
|
||||
]
|
||||
){
|
||||
[Name = CatalogName, Kind = "Database"]
|
||||
}[Data],
|
||||
// " SELECT DISTINCT A.REGION_TYPE,'BBU_COUNTY' REGION_NAME
|
||||
// FROM DM.dm_ext_county_tf_sales_region A
|
||||
// WHERE A.REGION_TYPE IN ('bbu_county_obu_nonEast5','BBU COUNTY')
|
||||
// UNION ALL
|
||||
// SELECT DISTINCT A.REGION_TYPE,'BBU_BU_COUNTY' REGION_NAME
|
||||
// FROM DM.dm_ext_county_tf_sales_region A
|
||||
// WHERE A.REGION_TYPE IN ('BBU_BU_COUNTY','bbu_bu_county_obu_East5','bbu_bu_county_obu_nonEast5')
|
||||
// UNION ALL
|
||||
// SELECT DISTINCT A.REGION_TYPE,'OBU East5' REGION_NAME
|
||||
// FROM DM.dm_ext_county_tf_sales_region A
|
||||
// WHERE A.REGION_TYPE = 'bbu_bu_county_obu_East5'
|
||||
// UNION ALL
|
||||
// SELECT DISTINCT A.REGION_TYPE,'OBU NonEast5' REGION_NAME
|
||||
// FROM DM.dm_ext_county_tf_sales_region A
|
||||
// WHERE A.REGION_TYPE IN ('bbu_bu_county_obu_nonEast5','bbu_county_obu_nonEast5')
|
||||
// "
|
||||
"SELECT DISTINCT A.REGION_TYPE
|
||||
FROM DM.dm_ext_county_tf_sales_region A
|
||||
WHERE A.REGION_TYPE IS NOT NULL"
|
||||
& UsingLimit,
|
||||
null,
|
||||
[
|
||||
EnableFolding = true
|
||||
]
|
||||
),
|
||||
已添加自定义 = Table.AddColumn(Source, "region_name", each if [REGION_TYPE]="bbu_bu_county_obu_East5" then "OBU East5"
|
||||
else if List.Contains({"bbu_bu_county_obu_nonEast5", "bbu_county_obu_nonEast5"}, [REGION_TYPE]) then "OBU NonEast5"
|
||||
else if List.Contains({"BBU County", "bbu_county_obu_nonEast5"}, [REGION_TYPE]) then "BBU County"
|
||||
else if List.Contains({"BBU_BU_COUNTY", "bbu_bu_county_obu_East5","bbu_bu_county_obu_nonEast5"}, [REGION_TYPE]) then "BBU_BU_COUNTY"
|
||||
else 9),
|
||||
#"Added Custom" = Table.AddColumn(已添加自定义, "IS_HIDDEN_COUNTY", each if Text.StartsWith([region_name], "OBU") then 1 else if Text.StartsWith([region_name], "BBU") then 0 else 0)
|
||||
in
|
||||
#"Added Custom"
|
||||
```
|
||||
|
||||
annotation PBI_ResultType = Table
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation TabularEditor_TableGroup = 04_DimTable
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user