initial
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"parallelQueryLoading": true,
|
||||
"typeDetectionEnabled": true,
|
||||
"shouldNotifyUserOfNameConflictResolution": true
|
||||
}
|
||||
11
External All Channel.SemanticModel/.platform
Normal file
11
External All Channel.SemanticModel/.platform
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
|
||||
"metadata": {
|
||||
"type": "SemanticModel",
|
||||
"displayName": "External All Channel"
|
||||
},
|
||||
"config": {
|
||||
"version": "2.0",
|
||||
"logicalId": "bcbe6f4e-ce6c-4a10-9fb7-ca20371860a8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"tabOrder": [
|
||||
"Query 1",
|
||||
"Query 2"
|
||||
],
|
||||
"defaultTab": "Query 1"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// Welcome to DAX query view! Learn more about DAX queries at https://aka.ms/dax-queries.
|
||||
// Right-click on tables, columns, or measures in the data pane to access quick queries, or ask Copilot for help writing DAX.
|
||||
|
||||
// Select "Run" to try this sample DAX query.
|
||||
EVALUATE
|
||||
{
|
||||
[YM_HasData_AIA]
|
||||
}
|
||||
13
External All Channel.SemanticModel/DAXQueries/Query 2.dax
Normal file
13
External All Channel.SemanticModel/DAXQueries/Query 2.dax
Normal file
@@ -0,0 +1,13 @@
|
||||
EVALUATE
|
||||
SELECTCOLUMNS(
|
||||
TOPN(
|
||||
100,
|
||||
'Fields_Geo',
|
||||
'Fields_Geo'[Province],
|
||||
ASC
|
||||
),
|
||||
'Fields_Geo'[Province],
|
||||
'Fields_Geo'[Province 个字段],
|
||||
'Fields_Geo'[Province 个订单]
|
||||
)
|
||||
ORDER BY 'Fields_Geo'[Province] ASC
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"tabOrder": [
|
||||
"20251204"
|
||||
],
|
||||
"defaultTab": "20251204"
|
||||
}
|
||||
57
External All Channel.SemanticModel/TMDLScripts/20251204.tmdl
Normal file
57
External All Channel.SemanticModel/TMDLScripts/20251204.tmdl
Normal file
@@ -0,0 +1,57 @@
|
||||
createOrReplace
|
||||
|
||||
table MQY
|
||||
lineageTag: d1b1f83d-7eb1-4ff3-bfdb-4ef33a10fca8
|
||||
|
||||
calculationGroup
|
||||
|
||||
calculationItem MTH = SELECTEDMEASURE()
|
||||
|
||||
calculationItem QTD = CALCULATE(SELECTEDMEASURE(), DATESQTD(Dim_Calendar[Date]))
|
||||
|
||||
calculationItem YTD = CALCULATE(SELECTEDMEASURE(), DATESYTD(Dim_Calendar[Date]))
|
||||
|
||||
calculationItem QTDAvg = CALCULATE( AVERAGEX(VALUES(Dim_Calendar[YYYYMM]), SELECTEDMEASURE()+0 ),DATESQTD(Dim_Calendar[Date]) )
|
||||
|
||||
calculationItem HYTDAvg =
|
||||
|
||||
VAR Y = MAX(Dim_Calendar[Year])
|
||||
VAR M = MAX(Dim_Calendar[MONTH])
|
||||
VAR DT0 = IF(M<=6, DATE(Y,1,1), DATE(Y,7,1))
|
||||
VAR DT1 = MAX(Dim_Calendar[Date])
|
||||
RETURN CALCULATE(
|
||||
AVERAGEX(VALUES(Dim_Calendar[YYYYMM]), SELECTEDMEASURE()+0),
|
||||
DATESBETWEEN(Dim_Calendar[Date], DT0, DT1)
|
||||
)
|
||||
|
||||
calculationItem RHYAvg =
|
||||
|
||||
VAR Y = MAX(Dim_Calendar[Year])
|
||||
VAR M = MAX(Dim_Calendar[MONTH])
|
||||
VAR DT = IF(M<=6, DATE(Y,1,1), DATE(Y,7,1))
|
||||
VAR DT0 = DATE(YEAR(DT), MONTH(DT)-6,1)
|
||||
VAR DT1 = DATE(YEAR(DT0), MONTH(DT0)+5,1)
|
||||
RETURN CALCULATE(
|
||||
AVERAGEX(VALUES(Dim_Calendar[YYYYMM]), SELECTEDMEASURE()+0),
|
||||
DATESBETWEEN(Dim_Calendar[Date], DT0, DT1)
|
||||
)
|
||||
//return DT1
|
||||
|
||||
column Period
|
||||
dataType: string
|
||||
lineageTag: cd2f1dfe-55bd-4315-8569-5f3d985e5936
|
||||
summarizeBy: none
|
||||
sourceColumn: Name
|
||||
sortByColumn: 序号
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
column 序号
|
||||
dataType: int64
|
||||
formatString: 0
|
||||
lineageTag: e563ba22-724a-4b45-b545-567fcba9d094
|
||||
summarizeBy: sum
|
||||
sourceColumn: Ordinal
|
||||
|
||||
annotation SummarizationSetBy = Automatic
|
||||
|
||||
4
External All Channel.SemanticModel/definition.pbism
Normal file
4
External All Channel.SemanticModel/definition.pbism
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"version": "4.2",
|
||||
"settings": {}
|
||||
}
|
||||
172230
External All Channel.SemanticModel/definition/cultures/zh-CN.tmdl
Normal file
172230
External All Channel.SemanticModel/definition/cultures/zh-CN.tmdl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
database
|
||||
compatibilityLevel: 1606
|
||||
|
||||
152
External All Channel.SemanticModel/definition/expressions.tmdl
Normal file
152
External All Channel.SemanticModel/definition/expressions.tmdl
Normal file
@@ -0,0 +1,152 @@
|
||||
expression UsingLimit = if limit_validity then " limit " & limit else ""
|
||||
lineageTag: 93687462-63a3-4ca8-bb23-b980d178ec47
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_NavigationStepName = 导航
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
expression limit_validity = false meta [IsParameterQuery=true, Type="Logical", IsParameterQueryRequired=true]
|
||||
lineageTag: f2b9ee23-c638-4eac-97c1-bb332e01a16f
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_ResultType = Logical
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
expression limit = "10" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
|
||||
lineageTag: 13383dca-a800-45ed-b3a8-a2930ebf12c6
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
/// 切换数据源Http路径使用
|
||||
expression HttpPath = "sql/protocolv1/o/1064580724995799/1118-074021-486fqthp" meta [IsParameterQuery=true, List={"sql/protocolv1/o/1064580724995799/1118-074021-486fqthp", "sql/protocolv1/o/4124350841043461/0410-074134-do66802w"}, DefaultValue="sql/protocolv1/o/1064580724995799/1118-074021-486fqthp", Type="Text", IsParameterQueryRequired=true]
|
||||
lineageTag: 9c59df5e-b5dc-4259-a64d-7ae346dcb3e7
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
/// 切换数据目录使用
|
||||
expression CatalogName = "catalog_e2_ngbi_qas" meta [IsParameterQuery=true, List={"catalog_e2_ngbi_qas", "catalog_e2_ngbi_prd"}, DefaultValue="catalog_e2_ngbi_prd", Type="Text", IsParameterQueryRequired=true]
|
||||
lineageTag: f262d2bb-985d-406a-aacb-2c1d5b1430ac
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
/// 切换服务器主机地址使用
|
||||
expression ServerAddress = "adb-1064580724995799.3.databricks.azure.cn" meta [IsParameterQuery=true, List={"adb-1064580724995799.3.databricks.azure.cn", "adb-4124350841043461.1.databricks.azure.cn"}, DefaultValue="adb-1064580724995799.3.databricks.azure.cn", Type="Text", IsParameterQueryRequired=true]
|
||||
lineageTag: 08b2d8cc-13df-48c6-970c-d788d6b1da4f
|
||||
queryGroup: 参数
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
expression Fact_Sales_SQL = ```
|
||||
let
|
||||
Source = "
|
||||
select
|
||||
DATA_SOURCE,
|
||||
MARKET,
|
||||
KEY_COMPETITOR,
|
||||
CLASS,
|
||||
YYYYMM,
|
||||
PACK_COD,
|
||||
AUDIT_COD,
|
||||
VA,
|
||||
UT,
|
||||
CU,
|
||||
PT,
|
||||
SALES_UNIT_CAL,
|
||||
SALES_UNIT_CAL_LY,
|
||||
SALES_VALUE_CAL,
|
||||
SALES_VALUE_CAL_LY,
|
||||
CONUTING_UNIT,
|
||||
CONUTING_UNIT_LY,
|
||||
PDOT,
|
||||
PDOT_LY,
|
||||
PRESCRIPTION,
|
||||
PRESCRIPTION_LY,
|
||||
---关联主键-----------------------------
|
||||
TO_DATE(CONCAT(YYYYMM, '01'), 'yyyyMMdd') AS DATE_KEY,
|
||||
CONCAT(MARKET,DATA_SOURCE) AS MARKET_KEY,
|
||||
CONCAT(PACK_COD,DATA_SOURCE,'') AS PACK_SOURCE,
|
||||
CONCAT(AUDIT_COD,DATA_SOURCE) AS AUDIT_SOURCE,
|
||||
CONCAT(AUDIT_COD,DATA_SOURCE,'' ) AS AUDIT_KEY,
|
||||
CONCAT(MARKET,CLASS,DATA_SOURCE) AS CLASS_KEY,
|
||||
|
||||
CONCAT(STORE_TYPE,DATA_SOURCE) AS STORE_TYPE_SOURCE,
|
||||
CONCAT(STORE_TYPE,'-',PLATFORM_TYPE) AS STORE_PLATFORM,
|
||||
CONCAT(REIMBURSE_TYPE,DATA_SOURCE) AS REIMBURSETYPE_SOURCE,
|
||||
CONCAT(REIMBURSE,DATA_SOURCE) AS REIMBURSE_SOURCE,
|
||||
CONCAT(PRESCRIPTION_TYPE,DATA_SOURCE) AS PRESCRIPTION_SOURCE,
|
||||
CONCAT(PLATFORM_TYPE,DATA_SOURCE) AS PLATFORM_TYPE_SOURCE,
|
||||
CONCAT(dept_name,DATA_SOURCE) AS DEPT_SOURCE,
|
||||
CONCAT(INST_CODE,DATA_SOURCE) AS INST_SOURCE,
|
||||
CONCAT(AIA_HP_FLAG,DATA_SOURCE) AS HP_SOURCE,
|
||||
-------------------------------------
|
||||
--Retail藏数逻辑标签------------------
|
||||
PACK_FLAG,
|
||||
PROD_FLAG,
|
||||
DTP_FLAG,
|
||||
CMPS_FLAG,
|
||||
-------------------------------------
|
||||
--EC数据标签--------------------------
|
||||
PLATFORM_TYPE,
|
||||
STORE_NAME,
|
||||
STORE_TYPE,
|
||||
-------------------------------------
|
||||
--COUNTY数据标签----------------------
|
||||
REGION_TYPE,
|
||||
--AIA数据标签-------------------------
|
||||
INST_CODE,
|
||||
AIA_HP_FLAG,
|
||||
AIA_REMOVE,
|
||||
-------------------------------------
|
||||
--XIE HE 数据标签---------------------
|
||||
NEW_CODE,
|
||||
DEPT_NAME,
|
||||
H_LEVEL,
|
||||
REIMBURSE,
|
||||
REIMBURSE_TYPE,
|
||||
PRESCRIPTION_TYPE,
|
||||
-------------------------------------
|
||||
--Merged Data部分--------------------
|
||||
MERGEDATA_FLAG,
|
||||
MERGEDATA_FLAG_MKT,
|
||||
MERGEDATA_FLAG_CHPA_DTP,
|
||||
MERGEDATA_FLAG_DTP_NOROC,
|
||||
MERGED_DATA_DTP_OTHERS,
|
||||
EGFR_FLAG,
|
||||
-------------------------------------
|
||||
NULL AS CORP_COD
|
||||
from
|
||||
DM.DM_TF_EXT_UNIONALL_SALES_MAPPING
|
||||
"
|
||||
in
|
||||
Source
|
||||
```
|
||||
lineageTag: 312c3815-6670-40d9-95c7-499cad398ead
|
||||
queryGroup: Fact_Sales
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
expression Fact_Sales_SQL_limit =
|
||||
let
|
||||
Source = "limit 0"
|
||||
in
|
||||
Source
|
||||
lineageTag: 0f84d4f0-a309-44e1-a495-ffd9a5fdc993
|
||||
queryGroup: Fact_Sales
|
||||
|
||||
annotation PBI_NavigationStepName = Navigation
|
||||
|
||||
annotation PBI_ResultType = Text
|
||||
|
||||
266
External All Channel.SemanticModel/definition/model.tmdl
Normal file
266
External All Channel.SemanticModel/definition/model.tmdl
Normal file
@@ -0,0 +1,266 @@
|
||||
model Model
|
||||
culture: zh-CN
|
||||
defaultPowerBIDataSourceVersion: powerBI_V3
|
||||
discourageImplicitMeasures
|
||||
sourceQueryCulture: en-US
|
||||
valueFilterBehavior: independent
|
||||
dataAccessOptions
|
||||
legacyRedirects
|
||||
returnErrorValuesAsNull
|
||||
|
||||
queryGroup 参数
|
||||
|
||||
annotation PBI_QueryGroupOrder = 1
|
||||
|
||||
queryGroup 邮件通知
|
||||
|
||||
annotation PBI_QueryGroupOrder = 2
|
||||
|
||||
queryGroup Fact_Sales
|
||||
|
||||
annotation PBI_QueryGroupOrder = 3
|
||||
|
||||
queryGroup OLD\EXTERNAL_辅助表
|
||||
|
||||
annotation PBI_QueryGroupOrder = 6
|
||||
|
||||
queryGroup OLD\EXTERNAL_权限表
|
||||
|
||||
annotation PBI_QueryGroupOrder = 5
|
||||
|
||||
queryGroup OLD\非首页
|
||||
|
||||
annotation PBI_QueryGroupOrder = 1
|
||||
|
||||
queryGroup OLD\首页
|
||||
|
||||
annotation PBI_QueryGroupOrder = 0
|
||||
|
||||
queryGroup OLD\首页直取KPI
|
||||
|
||||
annotation PBI_QueryGroupOrder = 2
|
||||
|
||||
queryGroup OLD\非首页直取KPI
|
||||
|
||||
annotation PBI_QueryGroupOrder = 3
|
||||
|
||||
queryGroup OLD\FreeReport独有表
|
||||
|
||||
annotation PBI_QueryGroupOrder = 4
|
||||
|
||||
queryGroup 'OLD\AIA 权限组'
|
||||
|
||||
annotation PBI_QueryGroupOrder = 7
|
||||
|
||||
queryGroup 'OLD\AIA 独有表'
|
||||
|
||||
annotation PBI_QueryGroupOrder = 8
|
||||
|
||||
queryGroup OLD
|
||||
|
||||
annotation PBI_QueryGroupOrder = 0
|
||||
|
||||
queryGroup Dim
|
||||
|
||||
annotation PBI_QueryGroupOrder = 13
|
||||
|
||||
annotation __PBI_TimeIntelligenceEnabled = 0
|
||||
|
||||
annotation PBI_QueryOrder = ["Measure THC","Dim_PackInfo_Retail","Dim_MergeDataSource","Fact_Retail_Brand","Fact_Retail_RawData","Fact_EC_Total","Fact_Retail","Config_ReportURL","refresh_time","Dim_BrandMKT","Dim_Market_Total","Dim_MarketTA_Total","Dim_BrandDefaultMKT","Dim_Calendar","Dim_Corp","Dim_DataSource","Dim_Geo","Dim_PlatformMID","Dim_StoreTypeMID","Dim_GeoGroup","Dim_Market","Dim_MarketTA","Dim_MKTPackMapping","Dim_Org","Dim_PackInfo","Dim_Platform","Dim_StoreType","Dim_ExchangRate","DM_AUTH_ORG","DM_AUTH_PRD","DM_AUTH_SALES_GEO","DM_AUTH_SALES_MKT","DM_AUTH_SALES_PACK","DM_AUTH_SALES_ORG","DM_AUTH_GEO","HttpPath","CatalogName","ServerAddress","limit_validity","UsingLimit","limit","TOP","Dim_MKTPackMapping_Total","Dim_PackInfo_Total","Dim_RegionType","Fact_Sales_Total","Dim_Unit","dm_td_chpa_market_definition","Fact_Retail_Total","Fact_Sales_Total_AIA","Fact_EC","Dim_Class","Dim_HPFlag","Dim_HPFlag_AIASpecial","Dim_InsSalesType","Dim_InsSalesType_AIASpecial","Dim_IsTarget_AIASpecial","Dim_CoreDept","Dim_Dept","Dim_PrescriptionSource","Dim_Reimburse","Dim_ReimburseType","dm_auth_aia_sales_pack","dm_auth_aia_sales_geo","dm_auth_aia_sales_org","dm_auth_aia_sales_mkt","DM_AIA_TD_HOSPITAL_NOT_PROVIDED","Dim_Original_Col_AIA","Dim_HP_Potential_AIA","AIA.Measures","DM_AUTH_PRD_PACK","Fact_Retail_Special","Fact_Sales_NIAD","AIA_AdvanceAnalysis_Brand","AIA_AdvanceAnalysis_Class","AIA_AdvanceAnalysis_Key_Competitor","AIA_AdvanceAnalysis_Mole","AIA_AdvanceAnalysis_Subchannel","AIA_AdvanceAnalysis_DRAGON","AIA_AdvanceAnalysis_Decile","AIA_AdvanceAnalysis_Decile_Group","Dim_IsEagle_AIASpecial","Dim_IsEagle_Bridge_AIASpecial","Dim_RC","Dim_Institution","DM_AUTH_SALES_TA","DM_AUTH_NONSALES_TA","DM_AUTH_MERGED_DATA","DM_AUTH_NONSALES_ORG","dm_td_user_permission_detail","Config_MarketRatio","Config_MergeData","Dim_RC_Merged_Data","Fact_Sales_SQL","Fact_Sales_SQL_limit","Fact_Sales","Fact_AIA_DataQuality","DM_AUTH_EMAIL_NOTIFICATION","Config_EmailWarning","Dim_Remove_inst","Config_PageFlag_FreeReportNIAD","Config_VisualFlag","Fact_Sales_Main_AIA","Fact_Sales_Main_CHC","Fact_Sales_Main_CHPA","Fact_Sales_Main_COUNTY","Fact_Sales_Main_EC","Fact_Sales_Main_Retail","Fact_Sales_Main_XH","Fact_Sales_Main_DTP","Fact_Sales_THC","00_KPI","Dim_KeyCompetitor","Dim_Store","Dim_HP_Level"]
|
||||
|
||||
annotation __TEdtr = 1
|
||||
|
||||
annotation __LastRPTime = 134132553209188708
|
||||
|
||||
annotation PBI_ProTooling = ["CalcGroup","DaxQueryView_Desktop","TMDLView_Desktop","DevMode"]
|
||||
|
||||
annotation __BNorm = 1
|
||||
|
||||
ref table Dim_Org
|
||||
ref table Dim_Calendar
|
||||
ref table Dim_Corp
|
||||
ref table refresh_time
|
||||
ref table DM_AUTH_ORG
|
||||
ref table DM_AUTH_PRD
|
||||
ref table DM_AUTH_SALES_GEO
|
||||
ref table DM_AUTH_GEO
|
||||
ref table Dim_ExchangRate
|
||||
ref table TOP
|
||||
ref table Measure
|
||||
ref table Dim_BrandMKT
|
||||
ref table Dim_Calendar_Alt
|
||||
ref table Option_Trend_Mths
|
||||
ref table Option_IMSRankedBy
|
||||
ref table Fields_TopPlayer
|
||||
ref table 'Fields.Rows'
|
||||
ref table 'Measures Val'
|
||||
ref table Dim_MKTPackMapping_Total
|
||||
ref table Dim_MKTPackMapping
|
||||
ref table Fact_Sales
|
||||
ref table Fields_Leader
|
||||
ref table 'MarketGeo Val'
|
||||
ref table Fields_Geo
|
||||
ref table Fields_Matrix
|
||||
ref table Dim_MarketTA_Total
|
||||
ref table Dim_Market
|
||||
ref table Fact_Sales_Total
|
||||
ref table Dim_MarketTA
|
||||
ref table Dim_Unit
|
||||
ref table Dim_DataSource
|
||||
ref table Dim_PackInfo
|
||||
ref table Dim_Market_Total
|
||||
ref table Dim_PackInfo_Total
|
||||
ref table Dim_RegionType
|
||||
ref table Dim_BrandDefaultMKT
|
||||
ref table Dim_GeoGroup
|
||||
ref table Option_Geo
|
||||
ref table Dim_CorpType
|
||||
ref table Fact_Retail
|
||||
ref table Fact_Retail_Total
|
||||
ref table 'Fields.YQ'
|
||||
ref table 'Fields.CrossKPI'
|
||||
ref table MQY
|
||||
ref table Trend
|
||||
ref table Dim_Geo
|
||||
ref table 'retail 自有页面kpi'
|
||||
ref table retail自有维度
|
||||
ref table Dim_Platform
|
||||
ref table Dim_StoreType
|
||||
ref table Fact_EC_Total
|
||||
ref table Dim_PackInfo_Retail
|
||||
ref table Fact_EC
|
||||
ref table Fact_Retail_RawData
|
||||
ref table RetailExport
|
||||
ref table 'Retail.Export.KPI'
|
||||
ref table Fact_Retail_Brand
|
||||
ref table Dim_StoreTypeMID
|
||||
ref table Dim_PlatformMID
|
||||
ref table 'Price Val'
|
||||
ref table dm_td_chpa_market_definition
|
||||
ref table Dim_HPFlag
|
||||
ref table Dim_InsSalesType
|
||||
ref table TopN
|
||||
ref table Dim_Class
|
||||
ref table Dim_CoreDept
|
||||
ref table Dim_Dept
|
||||
ref table OrgMappingGeo
|
||||
ref table Dim_PrescriptionSource
|
||||
ref table Dim_Reimburse
|
||||
ref table Dim_ReimburseType
|
||||
ref table Dim_HPFlag_AIASpecial
|
||||
ref table Dim_InsSalesType_AIASpecial
|
||||
ref table Dim_IsTarget_AIASpecial
|
||||
ref table DM_AUTH_SALES_MKT
|
||||
ref table DM_AUTH_SALES_PACK
|
||||
ref table DM_AUTH_SALES_ORG
|
||||
ref table dm_auth_aia_sales_pack
|
||||
ref table dm_auth_aia_sales_geo
|
||||
ref table dm_auth_aia_sales_org
|
||||
ref table dm_auth_aia_sales_mkt
|
||||
ref table DM_AIA_TD_HOSPITAL_NOT_PROVIDED
|
||||
ref table Dim_Original_Col_AIA
|
||||
ref table Dim_HP_Potential_AIA
|
||||
ref table 'AIA.Fields_Columns'
|
||||
ref table 'AIA.Fields_Decile'
|
||||
ref table 'AIA.Fields_Geo'
|
||||
ref table 'AIA.Fields_Leader'
|
||||
ref table 'AIA.Fields_Measures_All'
|
||||
ref table 'AIA.Fields_MKT'
|
||||
ref table 'AIA.Fields.Rows'
|
||||
ref table 'AIA.Measures_MarketAdvanced'
|
||||
ref table 'AIA.Option_Geo'
|
||||
ref table 'AIA.Option_Ins'
|
||||
ref table CONFIG_ACCESS_ROLE
|
||||
ref table Dim_InsKey
|
||||
ref table CONFIG_ACCESS
|
||||
ref table 'AIA.Measures'
|
||||
ref table Dim_InsSalesTypeKey_AIA
|
||||
ref table DM_AUTH_PRD_PACK
|
||||
ref table CONFIG_REPORT
|
||||
ref table AIA_Decile_CalGroup
|
||||
ref table 'AIA.Fields_MarketBrand'
|
||||
ref table 'AIA.Option_Brand'
|
||||
ref table Fact_Sales_THC
|
||||
ref table 'Measure THC'
|
||||
ref table Measures_THC
|
||||
ref table AIA_AA_Calgroup
|
||||
ref table 'AIA.Fields_AdvanceAnalysis'
|
||||
ref table AIA_AdvanceAnalysis_Brand
|
||||
ref table AIA_AdvanceAnalysis_Class
|
||||
ref table AIA_AdvanceAnalysis_Mole
|
||||
ref table AIA_AdvanceAnalysis_Key_Competitor
|
||||
ref table AIA_AdvanceAnalysis_Subchannel
|
||||
ref table AIA_AdvanceAnalysis_DRAGON
|
||||
ref table AIA_AdvanceAnalysis_Decile
|
||||
ref table AIA_AdvanceAnalysis_Decile_Group
|
||||
ref table Config_ReportURL
|
||||
ref table Dim_IsEagle_AIASpecial
|
||||
ref table Dim_IsEagle_Bridge_AIASpecial
|
||||
ref table Dim_RC
|
||||
ref table Dim_Institution
|
||||
ref table Dim_GeoKey
|
||||
ref table Fact_Sales_Total_AIA
|
||||
ref table DM_AUTH_SALES_TA
|
||||
ref table DM_AUTH_NONSALES_TA
|
||||
ref table DM_AUTH_NONSALES_ORG
|
||||
ref table dm_td_user_permission_detail
|
||||
ref table 'Fields_CrossChannel5.2'
|
||||
ref table Dim_DataSource_ForRLS
|
||||
ref table Retail_Price_MQ_Fields
|
||||
ref table Fact_Retail_Special
|
||||
ref table Fields_TopPlayer_EN
|
||||
ref table Fields_Leader_EN
|
||||
ref table Config_MarketRatio
|
||||
ref table AIA_Calgroup
|
||||
ref table MA_Calgroup
|
||||
ref table Config_MergeData
|
||||
ref table AIA_Merge_Data
|
||||
ref table Dim_MergeDataSource
|
||||
ref table 'Fields_TopPlayer_5.1'
|
||||
ref table 'AIA.Fields_MergeData'
|
||||
ref table Table
|
||||
ref table Fields_Merged_Data
|
||||
ref table DM_AUTH_MERGED_DATA
|
||||
ref table AIA_TargetWithBlank
|
||||
ref table AIA_Merged_Data_opt
|
||||
ref table Dim_RC_Merged_Data
|
||||
ref table Option_IMSAnalyzeField
|
||||
ref table Fact_AIA_DataQuality
|
||||
ref table DM_AUTH_EMAIL_NOTIFICATION
|
||||
ref table Config_EmailWarning
|
||||
ref table Dim_Remove_inst
|
||||
ref table Fact_Sales_NIAD
|
||||
ref table 'Fields.FreeReportNIAD'
|
||||
ref table Config_PageFlag_FreeReportNIAD
|
||||
ref table Config_VisualFlag
|
||||
ref table Fact_Sales_Main_AIA
|
||||
ref table Fact_Sales_Main_CHC
|
||||
ref table Fact_Sales_Main_CHPA
|
||||
ref table Fact_Sales_Main_COUNTY
|
||||
ref table Fact_Sales_Main_EC
|
||||
ref table Fact_Sales_Main_Retail
|
||||
ref table Fact_Sales_Main_XH
|
||||
ref table Fact_Sales_Main_DTP
|
||||
ref table 00_KPI
|
||||
ref table Dim_KeyCompetitor
|
||||
ref table 0_Measure_CalGroup
|
||||
ref table Dim_Store
|
||||
ref table Dim_HP_Level
|
||||
|
||||
ref role PI_BISO
|
||||
ref role PI_ADMIN
|
||||
ref role PI_SMT
|
||||
ref role PI_GEO_IMS
|
||||
ref role PI_ORG_IMS
|
||||
ref role PI_PRD_IMS
|
||||
ref role PI_ALL_IMS
|
||||
ref role PI_SALES
|
||||
ref role PI_SALES_DSM
|
||||
ref role ALL
|
||||
ref role BU
|
||||
ref role Province
|
||||
ref role SubBU
|
||||
ref role TA
|
||||
|
||||
ref cultureInfo zh-CN
|
||||
|
||||
1047
External All Channel.SemanticModel/definition/relationships.tmdl
Normal file
1047
External All Channel.SemanticModel/definition/relationships.tmdl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
role ALL
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = 2e85a58bbc234ed59fcb679df5eb6a41
|
||||
|
||||
16
External All Channel.SemanticModel/definition/roles/BU.tmdl
Normal file
16
External All Channel.SemanticModel/definition/roles/BU.tmdl
Normal file
@@ -0,0 +1,16 @@
|
||||
role BU
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_MarketTA =
|
||||
Dim_MarketTA[TA_MAP] IN
|
||||
SELECTCOLUMNS (
|
||||
FILTER (
|
||||
DM_AUTH_NONSALES_ORG,
|
||||
DM_AUTH_NONSALES_ORG[USER_KCODE] = CUSTOMDATA ( )
|
||||
&& DM_AUTH_NONSALES_ORG[TA] <> BLANK ( )
|
||||
),
|
||||
"BU", DM_AUTH_NONSALES_ORG[TA]
|
||||
)
|
||||
|
||||
annotation PBI_Id = 50c9236daefe427a9fd509703cac0a63
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
role PI_ADMIN
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = fc6d5498bea1445bb06f6502fd1c1155
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
role PI_ALL_IMS
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = 97d0beba767741348d2a4072c4268b9a
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
role PI_BISO
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = e44162c710754cdb8ff12804b975b3b4
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
role PI_GEO_IMS
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = c0bbf882ccc84885b9e1ab5bcaafe392
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
role PI_ORG_IMS
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_RC =
|
||||
Dim_RC[sub_bu_code_auth] IN
|
||||
SELECTCOLUMNS (
|
||||
FILTER ( DM_AUTH_ORG, DM_AUTH_ORG[KCODE] = CUSTOMDATA ( ) ),
|
||||
"sub bu_code", DM_AUTH_ORG[SUB_BU_CODE]
|
||||
)
|
||||
|
||||
annotation PBI_Id = cd0d598bfb004161b931ed10f0abfe68
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
role PI_PRD_IMS
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_Market =
|
||||
Dim_Market[MARKET] IN
|
||||
SELECTCOLUMNS (
|
||||
FILTER ( DM_AUTH_PRD, DM_AUTH_PRD[KCODE] = CUSTOMDATA ( ) ),
|
||||
"market", DM_AUTH_PRD[MARKET]
|
||||
)
|
||||
|
||||
tablePermission Dim_PackInfo =
|
||||
Dim_PackInfo[PACK_COD] IN
|
||||
SELECTCOLUMNS (
|
||||
FILTER (
|
||||
DM_AUTH_PRD_PACK,
|
||||
DM_AUTH_PRD_PACK[KCODE] = CUSTOMDATA ( )
|
||||
),
|
||||
"PACK_COD", DM_AUTH_PRD_PACK[PACK_COD]
|
||||
)
|
||||
|
||||
annotation PBI_Id = 8bdaab61a673440f8dd9c968a39f1ea3
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
role PI_SALES
|
||||
modelPermission: read
|
||||
|
||||
tablePermission CONFIG_ACCESS_ROLE = [ROLE] == "PI_SALES"
|
||||
|
||||
tablePermission dm_auth_aia_sales_geo = [KCODE] = customdata()
|
||||
|
||||
tablePermission dm_auth_aia_sales_mkt = [KCODE] = customdata()
|
||||
|
||||
tablePermission dm_auth_aia_sales_org = [KCODE] = customdata()
|
||||
|
||||
tablePermission dm_auth_aia_sales_pack = [KCODE] = customdata()
|
||||
|
||||
tablePermission Dim_MarketTA =
|
||||
Dim_MarketTA[TA_SOURCE2]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(
|
||||
DM_AUTH_SALES_TA,DM_AUTH_SALES_TA[USER_KCODE]=customdata()
|
||||
),
|
||||
"TA_SOURCE",
|
||||
DM_AUTH_SALES_TA[TA_SOURCE])
|
||||
|
||||
tablePermission Dim_DataSource_ForRLS =
|
||||
[DATA_SOURCE]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(
|
||||
DM_AUTH_SALES_TA,DM_AUTH_SALES_TA[USER_KCODE]=customdata()
|
||||
),
|
||||
"TA_SOURCE",
|
||||
DM_AUTH_SALES_TA[DATA_SOURCE])
|
||||
|
||||
tablePermission DM_AUTH_MERGED_DATA = [sub_code] == customdata()
|
||||
|
||||
annotation PBI_Id = 6ef3de21ce5b4126b399307f67b91d45
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
role PI_SALES_DSM
|
||||
modelPermission: read
|
||||
|
||||
tablePermission CONFIG_ACCESS_ROLE = [ROLE] == "PI_SALES_DSM"
|
||||
|
||||
tablePermission dm_auth_aia_sales_geo = [KCODE] = CUSTOMDATA()
|
||||
|
||||
tablePermission dm_auth_aia_sales_mkt = [KCODE] = CUSTOMDATA()
|
||||
|
||||
tablePermission dm_auth_aia_sales_org = [KCODE] = CUSTOMDATA()
|
||||
|
||||
tablePermission dm_auth_aia_sales_pack = [KCODE] = CUSTOMDATA()
|
||||
|
||||
tablePermission Dim_MarketTA =
|
||||
Dim_MarketTA[TA_SOURCE2]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(
|
||||
DM_AUTH_SALES_TA,DM_AUTH_SALES_TA[USER_KCODE]=CUSTOMDATA()
|
||||
),
|
||||
"TA_SOURCE",
|
||||
DM_AUTH_SALES_TA[TA_SOURCE])
|
||||
|
||||
tablePermission Dim_DataSource_ForRLS =
|
||||
[DATA_SOURCE]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(
|
||||
DM_AUTH_SALES_TA,DM_AUTH_SALES_TA[USER_KCODE]=CUSTOMDATA()
|
||||
),
|
||||
"TA_SOURCE",
|
||||
DM_AUTH_SALES_TA[DATA_SOURCE])
|
||||
|
||||
tablePermission DM_AUTH_MERGED_DATA = [sub_code] == CUSTOMDATA()
|
||||
|
||||
annotation PBI_Id = d9c1c2482b2145dbb5f00bee13992057
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
role PI_SMT
|
||||
modelPermission: read
|
||||
|
||||
annotation PBI_Id = 3f368a2f334748dfb19293c75cd0ac07
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
role Province
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_Geo =
|
||||
Dim_Geo[PROVINCE_C]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(
|
||||
dm_td_user_permission_detail,
|
||||
dm_td_user_permission_detail[user_kcode]=CUSTOMDATA()
|
||||
&& dm_td_user_permission_detail[role] <> "PI_RMTPMT"
|
||||
&& dm_td_user_permission_detail[province_name] <> BLANK()
|
||||
),
|
||||
"PROVINCE",
|
||||
dm_td_user_permission_detail[province_name])
|
||||
|
||||
annotation PBI_Id = b694ee61c26249ee9f183ce0fb4d3b58
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
role SubBU
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_MarketTA =
|
||||
Dim_MarketTA[TA_MAP]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(DM_AUTH_NONSALES_ORG,
|
||||
DM_AUTH_NONSALES_ORG[USER_KCODE]=CUSTOMDATA()
|
||||
&& DM_AUTH_NONSALES_ORG[TA] <> BLANK()
|
||||
),
|
||||
"SubBU",
|
||||
DM_AUTH_NONSALES_ORG[TA])
|
||||
|
||||
annotation PBI_Id = 6de7d2c047f54f27803b6c6c9335348e
|
||||
|
||||
16
External All Channel.SemanticModel/definition/roles/TA.tmdl
Normal file
16
External All Channel.SemanticModel/definition/roles/TA.tmdl
Normal file
@@ -0,0 +1,16 @@
|
||||
role TA
|
||||
modelPermission: read
|
||||
|
||||
tablePermission Dim_MarketTA =
|
||||
Dim_MarketTA[TA_MAP]
|
||||
IN
|
||||
SELECTCOLUMNS(
|
||||
FILTER(DM_AUTH_NONSALES_TA,
|
||||
DM_AUTH_NONSALES_TA[USER_KCODE]=CUSTOMDATA()
|
||||
&& DM_AUTH_NONSALES_TA[TA] <> BLANK()
|
||||
),
|
||||
"TA",
|
||||
DM_AUTH_NONSALES_TA[TA])
|
||||
|
||||
annotation PBI_Id = 74d3ac65675a412388616821facee602
|
||||
|
||||
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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user