analytics/pbi/report/Model/tables/mp остатки.tmdl
2026-02-22 15:39:05 +03:00

104 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

table 'mp остатки'
column Узел
dataType: string
isHidden
summarizeBy: none
sourceColumn: Узел
changedProperty = IsHidden
annotation SummarizationSetBy = Automatic
column Тип
dataType: string
summarizeBy: none
sourceColumn: Тип
annotation SummarizationSetBy = Automatic
column Склад
dataType: string
summarizeBy: none
sourceColumn: Склад
annotation SummarizationSetBy = Automatic
column 'Дата обновления'
dataType: dateTime
isHidden
formatString: Long Date
summarizeBy: none
sourceColumn: Дата обновления
changedProperty = IsHidden
annotation SummarizationSetBy = Automatic
annotation UnderlyingDateTimeDataType = Date
column artic_id
dataType: string
isHidden
summarizeBy: none
sourceColumn: artic_id
changedProperty = IsHidden
annotation SummarizationSetBy = Automatic
column id_внешний
dataType: string
summarizeBy: none
sourceColumn: id_внешний
annotation SummarizationSetBy = Automatic
column 'Остаток МП, упак'
dataType: int64
formatString: #,0
summarizeBy: sum
sourceColumn: Остаток МП, упак
annotation SummarizationSetBy = Automatic
column 'Доступно, упак'
dataType: int64
formatString: #,0
summarizeBy: sum
sourceColumn: Доступно, упак
annotation SummarizationSetBy = Automatic
column 'Остаток МП, шт'
dataType: double
formatString: #,0
summarizeBy: sum
sourceColumn: Остаток МП, шт
annotation SummarizationSetBy = Automatic
column 'Остаток МП, руб' = 'mp остатки'[Остаток МП, шт] * RELATED('Номенклатура'[Цена учетная, руб])
formatString: #,0
summarizeBy: sum
annotation SummarizationSetBy = Automatic
partition 'mp остатки' = m
mode: import
source =
let
Источник = Sql.Database("prdsql", "mag_pbi"),
#"pbi_Внешние остатки" = Источник{[Schema="pbi",Item="Внешние остатки"]}[Data],
#"Измененный тип" = Table.TransformColumnTypes(#"pbi_Внешние остатки",{{"Дата обновления", type date}, {"Количество", Int64.Type}, {"Доступное кол-во", Int64.Type}}),
#"Переименованные столбцы" = Table.RenameColumns(#"Измененный тип",{{"Количество", "Остаток, упак"}, {"Доступное кол-во", "Доступно, упак"}}),
#"Обрезанный текст" = Table.TransformColumns(#"Переименованные столбцы",{{"id_внешний", Text.Trim, type text}}),
#"Переименованные столбцы1" = Table.RenameColumns(#"Обрезанный текст",{{"Остаток, упак", "Остаток МП, упак"}})
in
#"Переименованные столбцы1"
annotation PBI_ResultType = Table
annotation PBI_NavigationStepName = Навигация