This commit is contained in:
2026-04-29 21:54:08 +08:00
parent 49b89352aa
commit 7babc42523
257 changed files with 106038 additions and 54243 deletions

View File

@@ -239,6 +239,7 @@ ref table Fact_Direct_Retail_national_corp_rank
ref table Fact_Direct_Retail_national_prd_rank
ref table Fact_Direct_Retail_rx_top_corp
ref table Fact_Direct_Retail_region_corp_rank
ref table Fields_Rows_NIAD
ref role PI_BISO
ref role PI_ADMIN

View File

@@ -54,6 +54,39 @@ table 0_Measure_CalGroup
Fact_Sales_NIAD[MARKET] = "all market"
)
calculationItem _price_page_allmkt_switch =
IF (--如果筛选market相关
ISFILTERED ( Dim_Market[MARKET] )
|| ISFILTERED ( Dim_MarketTA[TA] )
|| ISFILTERED ( Dim_BrandDefaultMKT[BRAND_NAME] ),
CALCULATE (
SELECTEDMEASURE ( ),
KEEPFILTERS (
Dim_PackInfo[DATA_SOURCE] = "Retail(Quarterly)"
),
TREATAS (
CALCULATETABLE (
VALUES ( Fact_Sales[PACK_COD] ),
Fact_Sales[MARKET] <> "all market"
),
Dim_PackInfo[PACK_COD]
)
),
CALCULATE (
SELECTEDMEASURE ( ),
KEEPFILTERS (
Dim_PackInfo[DATA_SOURCE] = "Retail(Quarterly)"
),
TREATAS (
CALCULATETABLE (
VALUES ( Fact_Sales[PACK_COD] ),
Fact_Sales[MARKET] = "all market"
),
Dim_PackInfo[PACK_COD]
)
)
)
column for_measure
dataType: string
lineageTag: daa1dfa2-573f-47cb-9ad6-1985b05ce72e

View File

@@ -1,10 +1,8 @@
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
@@ -15,7 +13,6 @@ table Dim_BrandDefaultMKT
column MARKET
dataType: string
isHidden
lineageTag: e6905886-16ef-4d95-a6d8-6e22081dbab9
summarizeBy: none
sourceColumn: MARKET
@@ -26,7 +23,6 @@ table Dim_BrandDefaultMKT
column DATA_SOURCE
dataType: string
isHidden
lineageTag: 5ecb43ae-cd7d-4a5b-b2df-d25ed40fe613
summarizeBy: none
sourceColumn: DATA_SOURCE
@@ -36,7 +32,6 @@ table Dim_BrandDefaultMKT
annotation SummarizationSetBy = Automatic
column MKT_SOURCE = [MARKET] & [DATA_SOURCE]
isHidden
lineageTag: 894eafdd-30e1-4a26-8de5-01d81bb3283d
summarizeBy: none
@@ -46,7 +41,6 @@ table Dim_BrandDefaultMKT
column VBP
dataType: string
isHidden
lineageTag: c05777c6-1ca6-45cf-9c15-8665d2785d1c
summarizeBy: none
sourceColumn: VBP
@@ -57,7 +51,6 @@ table Dim_BrandDefaultMKT
column MKT_FLAG
dataType: int64
isHidden
formatString: 0
lineageTag: 38b2902d-c7f6-4400-9c6f-2951bc9d87c7
summarizeBy: sum
@@ -69,7 +62,6 @@ table Dim_BrandDefaultMKT
column PRD_FLAG
dataType: int64
isHidden
formatString: 0
lineageTag: 162b0e6d-a619-485a-8d3d-b69f9d6a807c
summarizeBy: sum

View File

@@ -319,40 +319,51 @@ table Fact_Retail
}[Data],
"
with dm_zk_retail_sales_kpi as (
SELECT
A.PACK_CODE,
A.CORP_COD,
TA,
YYYYMM,
YTD,
GEO_KEY,
KPI_NAME,
TOTAL_FLAG,
INT(DTP_FLAG) DTP_FLAG,
DATA_SOURCE,
SUM(CAST(KPI_VAL AS DECIMAL(38, 16))) KPI_VAL,
SUM(CAST(KPI_VAL_LY AS DECIMAL(38, 16))) KPI_VAL_LY,
MAX(STR_KPI_VAL) STR_KPI_VAL,
MAX(STR_KPI_VAL_LY) STR_KPI_VAL_LY,
SUM(CAST(KPI_VOL AS DECIMAL(38, 16))) KPI_VOL,
SUM(CAST(KPI_VOL_LY AS DECIMAL(38, 16))) KPI_VOL_LY,
MAX(STR_KPI_VOL) STR_KPI_VOL,
MAX(STR_KPI_VOL_LY) STR_KPI_VOL_LY,
MAX(PACK_FLAG) PACK_FLAG,
MAX(BRAND_FLAG) PROD_FLAG
FROM
dm.dm_zk_retail_sales_kpi A
GROUP BY
A.PACK_CODE,
A.CORP_COD,
TA,
YYYYMM,
YTD,
GEO_KEY,
KPI_NAME,
TOTAL_FLAG,
DATA_SOURCE,
DTP_FLAG
SELECT
A.PACK_CODE,
A.CORP_COD,
TA,
YYYYMM,
YTD,
GEO_KEY,
KPI_NAME,
TOTAL_FLAG,
INT(DTP_FLAG) DTP_FLAG,
DATA_SOURCE,
SUM(CAST(KPI_VAL AS DECIMAL(38, 16))) KPI_VAL,
SUM(CAST(KPI_VAL_LY AS DECIMAL(38, 16))) KPI_VAL_LY,
MAX(STR_KPI_VAL) STR_KPI_VAL,
MAX(STR_KPI_VAL_LY) STR_KPI_VAL_LY,
SUM(CAST(KPI_VOL AS DECIMAL(38, 16))) KPI_VOL,
SUM(CAST(KPI_VOL_LY AS DECIMAL(38, 16))) KPI_VOL_LY,
MAX(STR_KPI_VOL) STR_KPI_VOL,
MAX(STR_KPI_VOL_LY) STR_KPI_VOL_LY,
MAX(PACK_FLAG) PACK_FLAG,
MAX(BRAND_FLAG) PROD_FLAG
FROM
dm.dm_zk_retail_sales_kpi A
left join (
select distinct
PACK_CODE
FROM
DM.DM_TD_EXT_RETAIL_MARKET_PACK_MAPPING
where
MARKET = 'NIAD (Non-Insulin Anti-Diabetic) Market'
) B
ON A.PACK_CODE = B.PACK_CODE
where
(B.pack_code IS NULL and a.KPI_NAME in ('weig_dist_rate','weighted_spread_rate','num_dist_rate','digital_spread_rate')) OR a.KPI_NAME NOT IN ('weig_dist_rate','weighted_spread_rate','num_dist_rate','digital_spread_rate')
GROUP BY
A.PACK_CODE,
A.CORP_COD,
TA,
YYYYMM,
YTD,
GEO_KEY,
KPI_NAME,
TOTAL_FLAG,
DATA_SOURCE,
DTP_FLAG
),
dim_pack AS (
SELECT

View File

@@ -262,6 +262,22 @@ table Fact_Sales_NIAD
annotation SummarizationSetBy = Automatic
column DIGITAL_SPREAD_RATE
dataType: string
lineageTag: d1fcf3a2-16ef-493a-902f-06948d06281c
summarizeBy: none
sourceColumn: DIGITAL_SPREAD_RATE
annotation SummarizationSetBy = Automatic
column WEIGHTED_SPREAD_RATE
dataType: string
lineageTag: 82828839-4da4-4d7a-b978-7853efe18933
summarizeBy: none
sourceColumn: WEIGHTED_SPREAD_RATE
annotation SummarizationSetBy = Automatic
partition Fact_Sales_NIAD = m
mode: import
queryGroup: Fact_Sales
@@ -308,7 +324,9 @@ table Fact_Sales_NIAD
DATE_KEY,
concat( PLATFORM,DATA_SOURCE) AS PLATFORM_KEY,
concat( STORE_TYPE,DATA_SOURCE) AS STORE_TYPE_KEY,
STORE_NAME
STORE_NAME,
DIGITAL_SPREAD_RATE,
WEIGHTED_SPREAD_RATE
FROM
DM.DM_TF_EXT_UNIONALL_SALES_MAPPING_NIAD
"
@@ -324,7 +342,7 @@ table Fact_Sales_NIAD
annotation PBI_NavigationStepName = Navigation
annotation PBI_ResultType = Exception
annotation PBI_ResultType = Table
annotation TabularEditor_TableGroup = 05_FactTable

View File

@@ -0,0 +1,152 @@
table Fields_Rows_NIAD
lineageTag: 93cb2a9f-c0ab-4896-be80-d30f94a8d754
column Fields_Rows_NIAD
lineageTag: eb222f19-fad4-4219-a6cc-a3f8fab05fbd
summarizeBy: none
sourceColumn: [Value1]
sortByColumn: 'Fields_Rows_NIAD Order'
relatedColumnDetails
groupByColumn: 'Fields_Rows_NIAD Fields'
annotation SummarizationSetBy = Automatic
column 'Fields_Rows_NIAD Fields'
isHidden
lineageTag: b9182791-bcf5-4571-bd71-6676de702ac1
summarizeBy: none
sourceColumn: [Value2]
sortByColumn: 'Fields_Rows_NIAD Order'
extendedProperty ParameterMetadata =
{
"version": 3,
"kind": 2
}
annotation SummarizationSetBy = Automatic
column 'Fields_Rows_NIAD Order'
isHidden
formatString: 0
lineageTag: 8a042bf7-07a8-4040-a283-8c63db4fdba1
summarizeBy: sum
sourceColumn: [Value3]
annotation SummarizationSetBy = Automatic
column 'Fields Category'
lineageTag: 27105bfb-4f77-46ec-b501-25e366a2b61a
summarizeBy: none
sourceColumn: [Value4]
sortByColumn: 'Fields Category Order'
annotation SummarizationSetBy = Automatic
column 'Fields Category Order'
lineageTag: 5c2297d4-b3ce-4701-a6d5-f485eb766c7d
summarizeBy: sum
sourceColumn: [Value5]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
partition Fields_Rows_NIAD = calculated
mode: import
source = ```
{
( "Data Source", NAMEOF ( 'Dim_DataSource'[SOURCENAME] ), 990, "KeepSelected",0 ),
( "Value Type", NAMEOF ( 'Dim_Unit'[DW] ), 991, "KeepSelected",0 ),
( "YEAR", NAMEOF ( Dim_Calendar[YEAR] ), 102, "Period",1 ),
( "YYYYHH", NAMEOF ( Dim_Calendar[HALF_YEAR] ), 103, "Period",1 ),
( "YYYYQQ", NAMEOF ( Dim_Calendar[YEAR_QUATER] ), 104, "Period",1 ),
( "YYYYMM", NAMEOF ( Dim_Calendar[YYYYMM] ), 105, "Period",1 ),
( "TA", NAMEOF ( 'Dim_MarketTA'[TA] ), 211, "Market & Product",2 ),
( "Market", NAMEOF ( 'Dim_Market'[MARKET] ), 212, "Market & Product",2 ),
( "Class", NAMEOF ( Dim_Class[Class] ), 213, "Market & Product",2 ),
( "Molecule CN", NAMEOF ( Dim_PackInfo[CMPS_DES_C] ), 214, "Market & Product",2 ),
( "Molecule EN", NAMEOF ( Dim_PackInfo[CMPS_DES] ), 215, "Market & Product",2 ),
( "Brand CN", NAMEOF ( 'Dim_PackInfo'[PROD_DES_C] ), 220, "Market & Product",2 ),
( "Brand EN", NAMEOF ( 'Dim_PackInfo'[PROD_DES] ), 221, "Market & Product",2 ),
( "Package EN", NAMEOF ( Dim_PackInfo[PACK_DES] ), 222, "Market & Product",2 ),
( "Package Code", NAMEOF ( Dim_PackInfo[PACK_COD] ), 223, "Market & Product",2 ),
( "Pack_LCH", NAMEOF ( Dim_PackInfo[PACK_LCH] ), 224, "Market & Product",2 ),
( "VBP", NAMEOF ( Dim_PackInfo[VBP_DESC] ), 225, "Market & Product",2 ),
( "VBP(Brand)", NAMEOF ( Dim_PackInfo[VBP_BRAND] ), 226, "Market & Product",2 ),
( "Key Brand", NAMEOF ( Dim_KeyCompetitor[KEY_COMPETITOR] ), 227, "Market & Product",2 ),
( "Originator/Generics", NAMEOF ( Dim_PackInfo[GENE_ORIG_DESC] ), 228, "Market & Product",2 ),
( "ATC1", NAMEOF ( Dim_PackInfo[ATC1_CODE_DESC] ), 230, "Market & Product",2 ),
( "ATC2", NAMEOF ( Dim_PackInfo[ATC2_CODE_DESC] ), 231, "Market & Product",2 ),
( "ATC3", NAMEOF ( Dim_PackInfo[ATC3_CODE_DESC] ), 232, "Market & Product",2 ),
( "ATC4", NAMEOF ( Dim_PackInfo[ATC4_CODE_DESC] ), 233, "Market & Product",2 ),
( "NFC1", NAMEOF ( Dim_PackInfo[APP1_COD_DES_C] ), 234, "Market & Product",2 ),
( "NFC2", NAMEOF ( Dim_PackInfo[APP2_COD_DES_C] ), 235, "Market & Product",2 ),
( "NFC3", NAMEOF ( Dim_PackInfo[APP3_COD_DES_C] ), 236, "Market & Product",2 ),
( "Platform(EC)", NAMEOF ( Dim_PlatformMID[PLATFORM_TYPE] ), 286, "Market & Product",2 ),
( "Store Type(EC)", NAMEOF ( Dim_StoreTypeMID[STORE_TYPE] ), 287, "Market & Product",2 ),
( "Store Name(EC)", NAMEOF ( Dim_Store[STORE_NAME] ), 288, "Market & Product",2 ),
( "STGH DESC", NAMEOF ( 'Dim_PackInfo'[STGH_DES] ), 241, "更多字段",5.5 ),
( "BIO DESC", NAMEOF ( 'Dim_PackInfo'[BIO_DESC] ), 242, "更多字段",5.5 ),
( "ETH OTC DESC", NAMEOF ( 'Dim_PackInfo'[ETH_OTC_DESC] ), 243, "更多字段",5.5 ),
( "NRDL DESC", NAMEOF ( 'Dim_PackInfo'[NRDL_DESC] ), 244, "更多字段",5.5 ),
( "NRDL EntryDate", NAMEOF ( 'Dim_PackInfo'[NRDL_ENTRY_DATE] ), 245, "更多字段",5.5 ),
( "EDL DESC", NAMEOF ( 'Dim_PackInfo'[EDL_DESC] ), 246, "更多字段",5.5 ),
( "TCM DESC", NAMEOF ( 'Dim_PackInfo'[TCM_DESC] ), 247, "更多字段",5.5 ),
( "Manufacturer Code", NAMEOF ( 'Dim_PackInfo'[MANU_COD] ), 248, "更多字段",5.5 ),
( "Manufacturer中文", NAMEOF ( 'Dim_PackInfo'[MANU_DES_C] ), 249, "更多字段",5.5 ),
( "PAED DESC", NAMEOF ( 'Dim_PackInfo'[PAED_DESC] ), 250, "更多字段",5.5 ),
( "GQCE DESC", NAMEOF ( 'Dim_PackInfo'[GQCE_DESC] ), 251, "更多字段",5.5 ),
( "MNFL Code", NAMEOF ( 'Dim_PackInfo'[MNFL_COD] ), 252, "更多字段",5.5 ),
( "Molecule Code", NAMEOF ( 'Dim_PackInfo'[CMPS_COD] ), 253, "更多字段",5.5 ),
( "Brand Code", NAMEOF ( 'Dim_PackInfo'[PROD_COD] ), 254, "更多字段",5.5 ),
( "ATC1 DES", NAMEOF ( 'Dim_PackInfo'[ATC1_DES] ), 255, "更多字段",5.5 ),
( "ATC2 DES", NAMEOF ( 'Dim_PackInfo'[ATC2_DES] ), 256, "更多字段",5.5 ),
( "ATC3 DES", NAMEOF ( 'Dim_PackInfo'[ATC3_DES] ), 257, "更多字段",5.5 ),
( "ATC4 DES", NAMEOF ( 'Dim_PackInfo'[ATC4_DES] ), 258, "更多字段",5.5 ),
( "NFC1 DES", NAMEOF ( 'Dim_PackInfo'[APP1_DES] ), 259, "更多字段",5.5 ),
( "NFC2 DES", NAMEOF ( 'Dim_PackInfo'[APP2_DES] ), 260, "更多字段",5.5),
( "NFC3 DES", NAMEOF ( 'Dim_PackInfo'[APP3_DES] ), 261, "更多字段",5.5),
( "VBP_BATCH", NAMEOF ( 'Dim_PackInfo'[VBP_BATCH] ), 262, "更多字段",5.5 ),
( "VBP_IMPLEMENTING_TIME", NAMEOF ( 'Dim_PackInfo'[VBP_IMPLEMENTING_TIME] ), 263, "更多字段",5.5 ),
( "Corp Code", NAMEOF ( 'Dim_PackInfo'[CORP_COD] ), 411, "Corporation",1.5),
( "Corp EN", NAMEOF ( 'Dim_PackInfo'[CORP_DES] ), 412, "Corporation",1.5),
( "Corp CN", NAMEOF ( 'Dim_PackInfo'[CORP_DES_C] ), 413, "Corporation",1.5),
( "MNC_LOCAL", NAMEOF ( Dim_PackInfo[CORP_TYPE] ), 414, "Corporation",1.5),
( "Manufacturer", NAMEOF ( Dim_PackInfo[MANU_DES] ), 415, "Corporation",1.5),
( "产品ID", NAMEOF ( 'Dim_PackInfo_Retail'[product_id] ), 611, "Retail/EC原始字段",6 ),
( "OTC/RX", NAMEOF ( 'Dim_PackInfo_Retail'[prescription_nature] ), 612, "Retail/EC原始字段",6 ),
( "中西药", NAMEOF ( 'Dim_PackInfo_Retail'[medicine_type] ), 613, "Retail/EC原始字段",6 ),
( "细分1", NAMEOF ( 'Dim_PackInfo_Retail'[zk_medicine_tier1] ), 614, "Retail/EC原始字段",6 ),
( "细分2", NAMEOF ( 'Dim_PackInfo_Retail'[zk_medicine_tier2] ), 615, "Retail/EC原始字段",6 ),
( "细分3", NAMEOF ( 'Dim_PackInfo_Retail'[zk_medicine_tier3] ), 616, "Retail/EC原始字段",6 ),
( "细分4", NAMEOF ( 'Dim_PackInfo_Retail'[zk_medicine_tier4] ), 617, "Retail/EC原始字段",6 ),
( "通用名", NAMEOF ( 'Dim_PackInfo_Retail'[common_name] ), 618, "Retail/EC原始字段",6 ),
( "剂型", NAMEOF ( 'Dim_PackInfo_Retail'[dosage_form] ), 619, "Retail/EC原始字段",6 ),
( "对象", NAMEOF ( 'Dim_PackInfo_Retail'[user_type] ), 620, "Retail/EC原始字段",6 ),
( "品名", NAMEOF ( 'Dim_PackInfo_Retail'[category_name] ), 621, "Retail/EC原始字段",6 ),
( "商品名", NAMEOF ( 'Dim_PackInfo_Retail'[product_name] ), 622, "Retail/EC原始字段",6 ),
( "品牌", NAMEOF ( 'Dim_PackInfo_Retail'[brand_name] ), 623, "Retail/EC原始字段",6 ),
( "厂家", NAMEOF ( 'Dim_PackInfo_Retail'[zk_manu_des] ), 624, "Retail/EC原始字段",6 ),
( "集团权益", NAMEOF ( 'Dim_PackInfo_Retail'[zk_corp_des] ), 625, "Retail/EC原始字段",6 ),
( "规格", NAMEOF ( 'Dim_PackInfo_Retail'[zk_pack_des] ), 626, "Retail/EC原始字段",6 ),
( "数字铺货率", NAMEOF ( Fact_Sales_NIAD[DIGITAL_SPREAD_RATE] ), 627, "Retail/EC原始字段",6 ),
( "加权铺货率", NAMEOF ( Fact_Sales_NIAD[WEIGHTED_SPREAD_RATE] ), 628, "Retail/EC原始字段",6 )
}
```
annotation PBI_Id = eb6965f844c14c25b396a93428a3a29c

View File

@@ -3526,8 +3526,7 @@ table Measure
SWITCH (
TRUE ( ),
//Retail
DS = "Retail" && DW_TYPE = "Value" && ISFILTERED ( Dim_Corp )
&& NOT ISFILTERED ( Dim_Market )
DS = "Retail" && DW_TYPE = "Value" && NOT ISFILTERED ( Dim_Market )
&& NOT ISFILTERED ( Dim_MarketTA )
&& NOT ISFILTERED ( Dim_BrandDefaultMKT )
&& NOT ISFILTERED ( Dim_PackInfo )
@@ -3698,8 +3697,7 @@ table Measure
SWITCH (
TRUE ( ),
//Retail
DS = "Retail" && DW_TYPE = "Value" && ISFILTERED ( Dim_Corp )
&& NOT ISFILTERED ( Dim_Market )
DS = "Retail" && DW_TYPE = "Value" && NOT ISFILTERED ( Dim_Market )
&& NOT ISFILTERED ( Dim_MarketTA )
&& NOT ISFILTERED ( Dim_BrandDefaultMKT )
&& NOT ISFILTERED ( Dim_PackInfo )
@@ -4004,22 +4002,22 @@ table Measure
annotation PBI_FormatHint = {"isGeneralNumber":true}
measure 'External.Sales.KPI.Market2.1' =
//VAR DS = [00.SOURCENAME]
//VAR DW_TYPE = SELECTEDVALUE ( Dim_Unit[DW_TYPE] )
//VAR _DW = SELECTEDVALUE ( Dim_Unit[DW] )
//RETURN
// SWITCH (
// TRUE ( ),
// //Retail
// DS = "Retail" && DW_TYPE = "Value" && ISFILTERED ( Dim_Corp )
// && NOT ISFILTERED ( Dim_Market )
// && NOT ISFILTERED ( Dim_MarketTA )
// && NOT ISFILTERED ( Dim_BrandDefaultMKT )
// && NOT ISFILTERED ( Dim_PackInfo )
// && NOT ISFILTERED ( Dim_GeoGroup )
// && NOT ISFILTERED ( Dim_Org ),
// CALCULATE ( Switch_Unit_Value ( _DW, [00.DirectRetail.national_corp_rank] ) ),
measure 'External.Sales.KPI.Market2.1' = ```
VAR DS = [00.SOURCENAME]
VAR DW_TYPE = SELECTEDVALUE ( Dim_Unit[DW_TYPE] )
VAR _DW = SELECTEDVALUE ( Dim_Unit[DW] )
RETURN
SWITCH (
TRUE ( ),
//Retail
DS = "Retail" && DW_TYPE = "Value"
&& NOT ISFILTERED ( Dim_Market )
&& NOT ISFILTERED ( Dim_MarketTA )
&& NOT ISFILTERED ( Dim_BrandDefaultMKT )
&& NOT ISFILTERED ( Dim_PackInfo )
&& NOT ISFILTERED ( Dim_GeoGroup )
&& NOT ISFILTERED ( Dim_Org ),
CALCULATE ( Switch_Unit_Value ( _DW, [01.DirectRetail.rx_market.Sales.Total] ) ),
CALCULATE (
[External.Sales.KPI.Market.MID],
ALL ( Dim_PackInfo ),
@@ -4029,7 +4027,7 @@ table Measure
ALL ( Dim_Dept ),
ALL ( Dim_CoreDept[CORE_DEPT] )
)
//)
)
---------------------------------KPI描述------------------------------------
------创建者zhouxin
------邮箱kmls393@astrazeneca.net
@@ -4040,27 +4038,28 @@ table Measure
------修改时间:
------修改内容:
----------------------------------------------------------------------------
```
displayFolder: 00Base\02_2.1\04
lineageTag: 6eefa808-4f5e-440e-be8b-9be762eaea64
annotation PBI_FormatHint = {"isGeneralNumber":true}
measure 'External.Sales.LY.KPI.Market2.1' =
//VAR DS = [00.SOURCENAME]
//VAR DW_TYPE = SELECTEDVALUE ( Dim_Unit[DW_TYPE] )
//VAR _DW = SELECTEDVALUE ( Dim_Unit[DW] )
//RETURN
// SWITCH (
// TRUE ( ),
// //Retail
// DS = "Retail" && DW_TYPE = "Value" && ISFILTERED ( Dim_Corp )
// && NOT ISFILTERED ( Dim_Market )
// && NOT ISFILTERED ( Dim_MarketTA )
// && NOT ISFILTERED ( Dim_BrandDefaultMKT )
// && NOT ISFILTERED ( Dim_PackInfo )
// && NOT ISFILTERED ( Dim_GeoGroup )
// && NOT ISFILTERED ( Dim_Org ),
// CALCULATE ( Switch_Unit_Value ( _DW, [00.DirectRetail.national_corp_rank.LY] ) ),
measure 'External.Sales.LY.KPI.Market2.1' = ```
VAR DS = [00.SOURCENAME]
VAR DW_TYPE = SELECTEDVALUE ( Dim_Unit[DW_TYPE] )
VAR _DW = SELECTEDVALUE ( Dim_Unit[DW] )
RETURN
SWITCH (
TRUE ( ),
//Retail
DS = "Retail" && DW_TYPE = "Value"
&& NOT ISFILTERED ( Dim_Market )
&& NOT ISFILTERED ( Dim_MarketTA )
&& NOT ISFILTERED ( Dim_BrandDefaultMKT )
&& NOT ISFILTERED ( Dim_PackInfo )
&& NOT ISFILTERED ( Dim_GeoGroup )
&& NOT ISFILTERED ( Dim_Org ),
CALCULATE ( Switch_Unit_Value ( _DW, [01.DirectRetail.rx_market.Sales.Total.LY] ) ),
CALCULATE (
[External.Sales.LY.KPI.Market.MID],
ALL ( Dim_PackInfo ),
@@ -4070,7 +4069,7 @@ table Measure
ALL ( Dim_Dept ),
ALL ( Dim_CoreDept[CORE_DEPT] )
)
//)
)
---------------------------------KPI描述------------------------------------
------创建者zhouxin
------邮箱kmls393@astrazeneca.net
@@ -4081,6 +4080,7 @@ table Measure
------修改时间:
------修改内容:
----------------------------------------------------------------------------
```
displayFolder: 00Base\02_2.1\04
lineageTag: e2fab734-0f98-4ebe-9c9b-1c1f39796178
@@ -7334,7 +7334,7 @@ table Measure
measure 'External.Sales.KPI.Filter' =
CALCULATE(COUNTROWS(Fact_Sales),ALL(Dim_Calendar))
CALCULATE([External.Value.MTH],MQY[Period]="mth")
displayFolder: OLD\External Sales
lineageTag: 301fa5ea-de21-48e3-a333-ac18f0dbef45

View File

@@ -40,8 +40,8 @@ table Retail_Price_MQ_Fields
mode: import
source =
{
("Year_Q", NAMEOF('Dim_Calendar_Alt'[YEAR_QUATER]), 0),
("Year_M", NAMEOF('Dim_Calendar_Alt'[YYYYMM]), 1)
("Year_Q", NAMEOF('Dim_Calendar_Alt'[YEAR_QUATER]), 0)
//,("Year_M", NAMEOF('Dim_Calendar_Alt'[YYYYMM]), 1)
}
annotation PBI_Id = 0244ed13466d48979366b63e4706b113

View File

@@ -1718,14 +1718,14 @@
{
"ordinal": 5,
"scrollPosition": {
"x": 229.60000610351563,
"x": 0,
"y": 0
},
"nodes": [
{
"location": {
"x": 784,
"y": 281
"x": 924.86983145261354,
"y": 1221.4586202128667
},
"nodeIndex": "Fact_Direct_Retail_rx_market",
"nodeLineageTag": "5ce8ace0-0e58-4a5e-b8f7-6a83ec904179",
@@ -1737,8 +1737,8 @@
},
{
"location": {
"x": 1355,
"y": 224
"x": 660.10497156263591,
"y": 864.49258971920256
},
"nodeIndex": "Dim_Calendar",
"nodeLineageTag": "b54e7974-59f5-4b19-b987-f439b32f640d",
@@ -1750,8 +1750,8 @@
},
{
"location": {
"x": 151,
"y": 363
"x": 1438.7157749870225,
"y": 838.16214082156262
},
"nodeIndex": "Dim_CorpType",
"nodeLineageTag": "765d61e6-451d-4b8e-8c67-4e7014f90b2a",
@@ -1763,8 +1763,8 @@
},
{
"location": {
"x": 654,
"y": 633
"x": 154.48832916669539,
"y": 1192.3349326786849
},
"nodeIndex": "Fact_Direct_Retail_national_corp_rank",
"nodeLineageTag": "40ba891d-21b7-4ded-ac27-2847d846b960",
@@ -1776,8 +1776,8 @@
},
{
"location": {
"x": 179,
"y": 728
"x": 50,
"y": 935.62217736698415
},
"nodeIndex": "Dim_Corp",
"nodeLineageTag": "188bce16-d07d-4b39-946b-b744c9a78bf3",
@@ -1789,8 +1789,8 @@
},
{
"location": {
"x": 427.20000076293945,
"y": 155
"x": 634.862731997126,
"y": 1454.324281643125
},
"nodeIndex": "Fact_Direct_Retail_rx_top_corp",
"nodeLineageTag": "fbf6f72a-cf36-4178-bba2-7c20331b90c9",
@@ -1799,6 +1799,123 @@
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 577.827157202817,
"y": 511.05791413550833
},
"nodeIndex": "Fact_Sales_Total",
"nodeLineageTag": "66266824-1f74-413e-9407-eaefe5310c49",
"size": {
"height": 300,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 310.41343508355817,
"y": 137.021436077011
},
"nodeIndex": "Dim_DataSource",
"nodeLineageTag": "8a47e04a-d7ca-4a96-bf05-10c9cff59288",
"size": {
"height": 176,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 598.77268138540967,
"y": 304.20408762664783
},
"nodeIndex": "Dim_StoreTypeMID",
"nodeLineageTag": "d6ca2686-554d-4d78-a475-7787f1325ec0",
"size": {
"height": 152,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 948.68916302272714,
"y": 814.401450932583
},
"nodeIndex": "Dim_PlatformMID",
"nodeLineageTag": "1cd2fd49-62d1-49ca-ac98-218be929baae",
"size": {
"height": 152,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 918.43718825366034,
"y": 172.38969187322118
},
"nodeIndex": "Dim_RegionType",
"nodeLineageTag": "6aa1d3be-7da3-480d-96ed-18f4d5839bbe",
"size": {
"height": 152,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 1051.8974961504327,
"y": 378.2293738577423
},
"nodeIndex": "Dim_DataSource_ForRLS",
"nodeLineageTag": "8a0dec48-e4ca-410e-bfb9-022ad263205c",
"size": {
"height": 176,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 288.27350794629433,
"y": 565.09257784830879
},
"nodeIndex": "Dim_PackInfo_Total",
"nodeLineageTag": "8bea7a10-d14d-4c7a-8199-365d12811eca",
"size": {
"height": 248,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 1204.7157749870225,
"y": 608.20782621739454
},
"nodeIndex": "Dim_Market_Total",
"nodeLineageTag": "e3bea067-c208-4eb5-84c4-2dd40535ed78",
"size": {
"height": 152,
"width": 234
},
"zIndex": 0
},
{
"location": {
"x": 628.556217382757,
"y": -50
},
"nodeIndex": "Dim_BrandMKT",
"nodeLineageTag": "ca124965-ac38-4d4a-add3-99afe0bd5da7",
"size": {
"height": 300,
"width": 234
},
"zIndex": 0
}
],
"name": "Layout 1",