20260514_PDOT_by_Month定版

This commit is contained in:
2026-05-14 16:57:06 +08:00
parent 84ae943bdb
commit b02475424a
12 changed files with 78 additions and 86 deletions

View File

@@ -1,12 +1,12 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.6.0/schema.json", "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.8.0/schema.json",
"name": "54e7d096b1570a75a958", "name": "54e7d096b1570a75a958",
"position": { "position": {
"x": 723.69360161491329, "x": 795.65721911342018,
"y": 141.11111111111111, "y": 143.77057886351568,
"z": 6000, "z": 6000,
"height": 35.555555555555557, "height": 35.687732342007436,
"width": 361.11111111111109, "width": 360.95592140201808,
"tabOrder": 0 "tabOrder": 0
}, },
"visual": { "visual": {

View File

@@ -58,8 +58,9 @@
} }
}, },
"queryRef": "Dim_Org.region_name_en_n", "queryRef": "Dim_Org.region_name_en_n",
"nativeQueryRef": "region_name_en_n", "nativeQueryRef": "Region",
"active": true "active": true,
"displayName": "Region"
}, },
{ {
"field": { "field": {
@@ -73,8 +74,9 @@
} }
}, },
"queryRef": "Dim_Geo.CITY_EN", "queryRef": "Dim_Geo.CITY_EN",
"nativeQueryRef": "CITY_EN", "nativeQueryRef": "City",
"active": true "active": true,
"displayName": "City"
}, },
{ {
"field": { "field": {
@@ -88,8 +90,9 @@
} }
}, },
"queryRef": "Dim_Org.rsm_name", "queryRef": "Dim_Org.rsm_name",
"nativeQueryRef": "rsm_name", "nativeQueryRef": "RSMName",
"active": true "active": true,
"displayName": "RSMName"
} }
], ],
"fieldParameters": [ "fieldParameters": [
@@ -138,7 +141,8 @@
} }
}, },
"queryRef": "Measure.External.Gr%.KPI", "queryRef": "Measure.External.Gr%.KPI",
"nativeQueryRef": "External.Gr%.KPI" "nativeQueryRef": "GR%",
"displayName": "GR%"
}, },
{ {
"field": { "field": {
@@ -152,7 +156,8 @@
} }
}, },
"queryRef": "Measure.External.MS%.KPI", "queryRef": "Measure.External.MS%.KPI",
"nativeQueryRef": "External.MS%.KPI" "nativeQueryRef": "MS%",
"displayName": "MS%"
}, },
{ {
"field": { "field": {

View File

@@ -1,5 +1,5 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.6.0/schema.json", "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.8.0/schema.json",
"name": "ea504404714004a727e0", "name": "ea504404714004a727e0",
"position": { "position": {
"x": 752, "x": 752,
@@ -303,6 +303,13 @@
"Value": "'Arial'" "Value": "'Arial'"
} }
} }
},
"start": {
"expr": {
"Literal": {
"Value": "0D"
}
}
} }
} }
} }

View File

@@ -67,7 +67,7 @@
[ [
{ {
"Literal": { "Literal": {
"Value": "'20'" "Value": "'10'"
} }
} }
] ]

View File

@@ -25,7 +25,7 @@
"selectedBookmark": { "selectedBookmark": {
"expr": { "expr": {
"Literal": { "Literal": {
"Value": "'7337b4204eb2cca5fedf'" "Value": "'ac39a9cfe1616baf4f21'"
} }
} }
} }

View File

@@ -1936,7 +1936,7 @@
} }
} }
], ],
"Top": 20 "Top": 10
} }
} }
}, },

View File

@@ -1,5 +1,5 @@
{ {
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.6.0/schema.json", "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.8.0/schema.json",
"name": "56d56c4280773c85cdbe", "name": "56d56c4280773c85cdbe",
"position": { "position": {
"x": 752, "x": 752,
@@ -303,6 +303,13 @@
"Value": "'Arial'" "Value": "'Arial'"
} }
} }
},
"start": {
"expr": {
"Literal": {
"Value": "0D"
}
}
} }
} }
} }

View File

@@ -25,7 +25,7 @@
"selectedBookmark": { "selectedBookmark": {
"expr": { "expr": {
"Literal": { "Literal": {
"Value": "'5f56a4563549764112e3'" "Value": "'59e2a00b35cc7c40e7e8'"
} }
} }
} }

View File

@@ -42416,6 +42416,16 @@ cultureInfo zh-CN
"State": "Generated", "State": "Generated",
"Weight": 0.99 "Weight": 0.99
} }
},
{
"RSMName": {
"State": "Suggested",
"Source": {
"Type": "External",
"Agent": "PowerBI.VisualColumnRename"
},
"Weight": 0.9
}
} }
] ]
}, },
@@ -46954,6 +46964,16 @@ cultureInfo zh-CN
"State": "Generated", "State": "Generated",
"Weight": 0.97 "Weight": 0.97
} }
},
{
"Region": {
"State": "Suggested",
"Source": {
"Type": "External",
"Agent": "PowerBI.VisualColumnRename"
},
"Weight": 0.9
}
} }
] ]
}, },

View File

@@ -28,9 +28,22 @@ table Config_TA_Countrows
){[Name = CatalogName, Kind = "Database"]}[Data], ){[Name = CatalogName, Kind = "Database"]}[Data],
" "
select select
count(distinct TA) as count_all_ta count(1) as count_all_ta
from from
DM.dm_td_ext_unionall_market (
SELECT
MARKET,
TA,
TA_MAP,
TA_RN,
MARKET_DESC,
DATA_SOURCE
FROM
dm.dm_td_ext_unionall_market_ta
WHERE
TA <> ''
OR TA_MAP <> ''
)
" "
& UsingLimit, & UsingLimit,
null, null,

View File

@@ -144,24 +144,11 @@ table Fact_Sales_Total_AIA
){ ){
[Name = CatalogName, Kind = "Database"] [Name = CatalogName, Kind = "Database"]
}[Data], }[Data],
"-- ============================================================ "
-- ============================================================
-- CTE 1: 品牌市场维度(小表,后续可广播) -- CTE 1: 品牌市场维度(小表,后续可广播)
-- ============================================================ -- ============================================================
WITH temp AS ( WITH
SELECT
a.BRAND_NAME,
a.BRAND_CODE,
a.CompatitorMarket,
a.MARKET
FROM DM.DM_TD_EXTERNAL_BRAND_MARKET a
LEFT JOIN (
SELECT PROD_DES, MAX(PROD_DES_C) AS PROD_DES_C
FROM dm.dm_td_external_packinfo
GROUP BY PROD_DES
) b ON a.IMSBRAND = b.PROD_DES
WHERE a.DEFAULTFLAG = 1
AND a.DATA_SOURCE = 'AIA(Monthly)'
),
-- ============================================================ -- ============================================================
-- CTE 2: 提前过滤 provided_flag避免 fact_sales 里重复执行子查询) -- CTE 2: 提前过滤 provided_flag避免 fact_sales 里重复执行子查询)
@@ -195,11 +182,12 @@ table Fact_Sales_Total_AIA
CASE WHEN CONUTING_UNIT_LY = 0 THEN NULL ELSE CAST(CONUTING_UNIT_LY AS DECIMAL(35,10)) END AS CONUTING_UNIT_LY, CASE WHEN CONUTING_UNIT_LY = 0 THEN NULL ELSE CAST(CONUTING_UNIT_LY AS DECIMAL(35,10)) END AS CONUTING_UNIT_LY,
CASE WHEN PDOT = 0 THEN NULL ELSE CAST(PDOT AS DECIMAL(35,10)) END AS PDOT, -- 修复:原为 prescription CASE WHEN PDOT = 0 THEN NULL ELSE CAST(PDOT AS DECIMAL(35,10)) END AS PDOT, -- 修复:原为 prescription
CASE WHEN PDOT_LY = 0 THEN NULL ELSE CAST(PDOT_LY AS DECIMAL(35,10)) END AS PDOT_LY CASE WHEN PDOT_LY = 0 THEN NULL ELSE CAST(PDOT_LY AS DECIMAL(35,10)) END AS PDOT_LY
FROM DM.dm_tf_ext_unionall_market_sales A FROM DM.dm_tf_ext_unionall_sales_mapping A
-- 用 CTE JOIN 替代 IN(subquery),支持 BROADCAST -- 用 CTE JOIN 替代 IN(subquery),支持 BROADCAST
left JOIN provided_insts p ON A.AUDIT_COD = p.inst_code left JOIN provided_insts p ON A.AUDIT_COD = p.inst_code
WHERE A.MARKET <> 'ALL Market' WHERE A.MARKET <> 'ALL Market'
AND A.DATA_SOURCE = 'AIA(Monthly)' AND A.DATA_SOURCE = 'AIA(Monthly)'
AND A.TARGET_INS = 'Y'
) )
-- ============================================================ -- ============================================================

View File

@@ -8897,9 +8897,6 @@ table Measure
measure 'External.Time.Text' = measure 'External.Time.Text' =
VAR A = "季度数据请选择3/6/9/12月份代表Q1/Q2/Q3/Q4请勿选择MTH" VAR A = "季度数据请选择3/6/9/12月份代表Q1/Q2/Q3/Q4请勿选择MTH"
VAR B = ""
VAR C = "因CHPA新版城市数据仍在核查中因此暂时关闭城市数据CHPA全国数据仍可正常使用"
VAR D = "分月市场系数折算功能尚未上线,当前市场系数为固定值,使用时请注意"
RETURN RETURN
SWITCH ( SWITCH (
TRUE ( ), TRUE ( ),
@@ -8907,19 +8904,6 @@ table Measure
&& "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] ) && "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] )
&& ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A && ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A
) )
& SWITCH (
TRUE ( ),
ISFILTERED ( Dim_Market[MARKET] )
&& CALCULATE (
NOT ISEMPTY ( Dim_Market ),
KEEPFILTERS (
TREATAS (
{ "severe Asthma", "Soliris Related Market" },
Dim_Market[MARKET]
)
)
), D
)
displayFolder: OLD\Others displayFolder: OLD\Others
lineageTag: 00f9abf4-12bb-4046-be83-59751684c132 lineageTag: 00f9abf4-12bb-4046-be83-59751684c132
@@ -8927,9 +8911,6 @@ table Measure
measure 'External.Time.Text.Free' = measure 'External.Time.Text.Free' =
VAR A = "季度数据请选择3/6/9/12月份代表Q1/Q2/Q3/Q4请勿选择MTH" VAR A = "季度数据请选择3/6/9/12月份代表Q1/Q2/Q3/Q4请勿选择MTH"
VAR B = ""
VAR C = "因CHPA新版城市数据仍在核查中因此暂时关闭城市数据CHPA全国数据仍可正常使用"
VAR D = "分月市场系数折算功能尚未上线,当前市场系数为固定值,使用时请注意"
RETURN RETURN
SWITCH ( SWITCH (
TRUE ( ), TRUE ( ),
@@ -8937,19 +8918,6 @@ table Measure
&& "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] ) && "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] )
&& ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A && ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A
) )
& SWITCH (
TRUE ( ),
ISFILTERED ( Dim_Market[MARKET] )
&& CALCULATE (
NOT ISEMPTY ( Dim_Market ),
KEEPFILTERS (
TREATAS (
{ "severe Asthma", "Soliris Related Market" },
Dim_Market[MARKET]
)
)
), D
)
displayFolder: OLD\Others displayFolder: OLD\Others
lineageTag: f42c3db3-7852-4a58-8f97-896df99dd911 lineageTag: f42c3db3-7852-4a58-8f97-896df99dd911
@@ -8958,9 +8926,6 @@ table Measure
measure 'External.Time.Text.EN' = measure 'External.Time.Text.EN' =
VAR A = VAR A =
"For quarterly data, please select 3/6/9/12 to represent Q1/Q2/Q3/Q4, do not select MTH" "For quarterly data, please select 3/6/9/12 to represent Q1/Q2/Q3/Q4, do not select MTH"
VAR B = ""
VAR C = ""
VAR D = "分月市场系数折算功能尚未上线,当前市场系数为固定值,使用时请注意"
RETURN RETURN
SWITCH ( SWITCH (
TRUE ( ), TRUE ( ),
@@ -8968,19 +8933,6 @@ table Measure
&& "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] ) && "Quarterly" IN VALUES ( Dim_DataSource[DATA_TYPE] )
&& ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A && ( NOT "Retail" IN VALUES ( Dim_DataSource[SOURCENAME] ) ), A
) )
& SWITCH (
TRUE ( ),
ISFILTERED ( Dim_Market[MARKET] )
&& CALCULATE (
NOT ISEMPTY ( Dim_Market ),
KEEPFILTERS (
TREATAS (
{ "severe Asthma", "Soliris Related Market" },
Dim_Market[MARKET]
)
)
), D
)
displayFolder: OLD\Others displayFolder: OLD\Others
lineageTag: 0499284a-1f72-4804-86ee-c813f44b22c7 lineageTag: 0499284a-1f72-4804-86ee-c813f44b22c7