Files
MarketAnalysis-Rebuild/External All Channel.SemanticModel/definition/tables/Fact_Sales_NIAD.tmdl
2026-03-29 14:24:01 +08:00

182 lines
4.4 KiB
Plaintext

table Fact_Sales_NIAD
lineageTag: 5ce66265-a4ef-457b-9400-e0d76042498d
column DATA_SOURCE
dataType: string
lineageTag: 764d40f0-97b3-41ab-92bb-b74d8624888f
summarizeBy: none
sourceColumn: DATA_SOURCE
annotation SummarizationSetBy = Automatic
column YYYYMM
dataType: string
lineageTag: 929931e8-c889-45d4-9acf-b9b1cfb96dc5
summarizeBy: none
sourceColumn: YYYYMM
annotation SummarizationSetBy = Automatic
column PACK_COD
dataType: string
lineageTag: b7a26006-cfb3-411f-9aa6-0bde24738f23
summarizeBy: none
sourceColumn: PACK_COD
annotation SummarizationSetBy = Automatic
column AUDIT_COD
dataType: string
lineageTag: fc16ae38-13de-45a6-88ce-14ebf3851f0b
summarizeBy: none
sourceColumn: AUDIT_COD
annotation SummarizationSetBy = Automatic
column SALES_UNIT_CAL
dataType: double
lineageTag: 21e71e6e-79b1-41a1-9d8c-b8c3f18d529f
summarizeBy: sum
sourceColumn: SALES_UNIT_CAL
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_UNIT_CAL_LY
dataType: double
lineageTag: 170f84e8-e787-4790-b847-df538521291b
summarizeBy: sum
sourceColumn: SALES_UNIT_CAL_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_VALUE_CAL
dataType: double
lineageTag: 5d5270ae-c260-491b-9a09-f54b405c0f88
summarizeBy: sum
sourceColumn: SALES_VALUE_CAL
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column SALES_VALUE_CAL_LY
dataType: double
lineageTag: ba604051-0bb1-45ce-81d7-1eae3f68b227
summarizeBy: sum
sourceColumn: SALES_VALUE_CAL_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column CONUTING_UNIT
dataType: double
lineageTag: 3b08c107-bdb7-4123-86ca-4578da496386
summarizeBy: sum
sourceColumn: CONUTING_UNIT
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column CONUTING_UNIT_LY
dataType: double
lineageTag: 92e36b49-4574-4cc5-8674-18351118d5a7
summarizeBy: sum
sourceColumn: CONUTING_UNIT_LY
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PACK_SOURCE
dataType: string
lineageTag: e68961c0-9624-4cb5-946c-9ad5216df6c4
summarizeBy: none
sourceColumn: PACK_SOURCE
annotation SummarizationSetBy = Automatic
column AUDIT_SOURCE
dataType: string
lineageTag: 33474150-ce11-4b0c-8ec2-ca7a2189fb16
summarizeBy: none
sourceColumn: AUDIT_SOURCE
annotation SummarizationSetBy = Automatic
column DATE_KEY
dataType: dateTime
formatString: Long Date
lineageTag: 807a9b02-bad7-4d13-810f-22b6bdc7a912
summarizeBy: none
sourceColumn: DATE_KEY
changedProperty = DataType
annotation SummarizationSetBy = Automatic
annotation UnderlyingDateTimeDataType = Date
partition Fact_Sales_NIAD = m
mode: import
queryGroup: OLD\FreeReport独有表
source = ```
let
Source =
Value.NativeQuery(
Databricks.Catalogs(
ServerAddress, HttpPath, [
Catalog = CatalogName,
Database = null,
EnableAutomaticProxyDiscovery = null,EnableQueryResultDownload="0"
]
){
[Name = CatalogName, Kind = "Database"]
}[Data],
"
SELECT
DATA_SOURCE,
YYYYMM,
PACK_COD,
AUDIT_COD,
nullif(SUM(SALES_UNIT_CAL), 0) AS SALES_UNIT_CAL,
nullif(SUM(SALES_UNIT_CAL_LY), 0) AS SALES_UNIT_CAL_LY,
nullif(SUM(SALES_VALUE_CAL), 0) AS SALES_VALUE_CAL,
nullif(SUM(SALES_VALUE_CAL_LY), 0) AS SALES_VALUE_CAL_LY,
nullif(SUM(CONUTING_UNIT), 0) AS CONUTING_UNIT,
nullif(SUM(CONUTING_UNIT_LY), 0) AS CONUTING_UNIT_LY,
concat( PACK_COD,DATA_SOURCE) AS PACK_SOURCE,
concat( AUDIT_COD,DATA_SOURCE) AS AUDIT_SOURCE,
concat( LEFT(YYYYMM,4),'-',RIGHT(YYYYMM,2),'-','01') AS DATE_KEY
FROM
dm.dm_tf_external_sales_niad
WHERE
DATA_SOURCE in ( 'Retail(Quarterly)','EC(Monthly)' )
GROUP BY
DATA_SOURCE,
YYYYMM,
PACK_COD,
AUDIT_COD
"
& UsingLimit,
null,
[
EnableFolding = true
]
)
in
Source
```
annotation PBI_NavigationStepName = Navigation
annotation PBI_ResultType = Table
annotation TabularEditor_TableGroup = 05_FactTable