analytics/pbi/report/Model/tables/analytics.Реальные оплаты.tmdl
2026-02-22 15:39:05 +03:00

207 lines
5.0 KiB
Plaintext

table 'analytics.Реальные оплаты'
column id
formatString: 0
summarizeBy: sum
isNameInferred
sourceColumn: analytics.DeficitWithAmount[id]
annotation SummarizationSetBy = Automatic
column scenario_id
formatString: 0
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[scenario_id]
annotation SummarizationSetBy = Automatic
column group_name
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[group_name]
annotation SummarizationSetBy = Automatic
column code
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[code]
annotation SummarizationSetBy = Automatic
column place_month
formatString: General Date
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[place_month]
variation Изменение
isDefault
relationship: 77e661c1-299a-4f20-a58c-e226f3ae045c
defaultHierarchy: LocalDateTable_5f6dc3da-6a29-40b4-acad-82e16902db2f.'Иерархия дат'
annotation SummarizationSetBy = Automatic
column arrival_month
formatString: General Date
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[arrival_month]
variation Изменение
isDefault
relationship: 2f08555e-2b99-4160-9e0a-cdb00e352d99
defaultHierarchy: LocalDateTable_e0151ce2-492d-4287-8527-f0bc571c1c52.'Иерархия дат'
annotation SummarizationSetBy = Automatic
column demand_window_C
summarizeBy: sum
isNameInferred
sourceColumn: analytics.DeficitWithAmount[demand_window_C]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column projected_stock_at_T
summarizeBy: sum
isNameInferred
sourceColumn: analytics.DeficitWithAmount[projected_stock_at_T]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column order_qty
summarizeBy: sum
isNameInferred
sourceColumn: analytics.DeficitWithAmount[order_qty]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column updated_at
formatString: General Date
summarizeBy: none
isNameInferred
sourceColumn: analytics.DeficitWithAmount[updated_at]
variation Изменение
isDefault
relationship: b1077884-696f-460a-a236-4e4f063a6977
defaultHierarchy: LocalDateTable_1587fe6c-4054-45e2-9900-7dfe1bfd059a.'Иерархия дат'
annotation SummarizationSetBy = Automatic
column DeficitRub
summarizeBy: sum
isNameInferred
sourceColumn: analytics.DeficitWithAmount[DeficitRub]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column ManufacturerId
formatString: 0
summarizeBy: count
isNameInferred
sourceColumn: analytics.DeficitWithAmount[ManufacturerId]
annotation SummarizationSetBy = Automatic
column stage_id
formatString: 0
summarizeBy: sum
isNameInferred
sourceColumn: analytics.StagesForPayments[stage_id]
annotation SummarizationSetBy = Automatic
column manufacturer_id
formatString: 0
summarizeBy: sum
isNameInferred
sourceColumn: analytics.StagesForPayments[manufacturer_id]
annotation SummarizationSetBy = Automatic
column name
summarizeBy: none
isNameInferred
sourceColumn: analytics.StagesForPayments[name]
annotation SummarizationSetBy = Automatic
column days
formatString: 0
summarizeBy: sum
isNameInferred
sourceColumn: analytics.StagesForPayments[days]
annotation SummarizationSetBy = Automatic
column percent
summarizeBy: sum
isNameInferred
sourceColumn: analytics.StagesForPayments[percent]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column sort_order
formatString: 0
summarizeBy: sum
isNameInferred
sourceColumn: analytics.StagesForPayments[sort_order]
annotation SummarizationSetBy = Automatic
column AmountRub
summarizeBy: sum
isNameInferred
sourceColumn: [AmountRub]
annotation SummarizationSetBy = Automatic
annotation PBI_FormatHint = {"isGeneralNumber":true}
column PaymentDate
formatString: General Date
summarizeBy: none
isNameInferred
sourceColumn: [PaymentDate]
annotation SummarizationSetBy = Automatic
partition 'analytics.Реальные оплаты' = calculated
mode: import
source = ```
VAR Base =
GENERATE(
'analytics.DeficitWithAmount',
FILTER(
'analytics.StagesForPayments',
'analytics.StagesForPayments'[manufacturer_id] = [ManufacturerId]
)
)
RETURN
ADDCOLUMNS(
Base,
"AmountRub", [DeficitRub] * 'analytics.StagesForPayments'[percent] / 100,
"PaymentDate",
IF(ISBLANK('analytics.StagesForPayments'[days]) || 'analytics.StagesForPayments'[days] = 0,
EOMONTH([place_month], 0) + 1,
EOMONTH([arrival_month], 0) + 1 - 'analytics.StagesForPayments'[days]
)
)
```
annotation PBI_Id = bad2c1d9b4ed434f8139be2c6c110b09