analytics/pbi/model/report/Model/tables/mp оборот.tmdl
2026-02-18 14:36:38 +03:00

148 lines
3.5 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 оборот'
measure 'Расходы к обороту, %' = ```
VAR _MinDate = DATE(2025, 1, 1)
RETURN
CALCULATE(
VAR _Turnover =
SUM('mp оборот'[Сумма оборот МП, руб])
VAR _Sales =
[Сумма продаж, руб]
RETURN
DIVIDE(
_Turnover - _Sales,
_Turnover,
0
),
KEEPFILTERS(
FILTER(
'.Календарь',
'.Календарь'[Дата] >= _MinDate
)
)
)
```
annotation PBI_FormatHint = {"isGeneralNumber":true}
measure 'Расходы МП + РК + СПП, руб' = ```
VAR _MinDate = DATE(2025, 1, 1)
RETURN
CALCULATE(
VAR _Turnover =
SUM('mp оборот'[Сумма оборот МП, руб])
VAR _Sales =
[Сумма продаж, руб]
RETURN
_Turnover - _Sales,
KEEPFILTERS(
FILTER(
'.Календарь',
'.Календарь'[Дата] >= _MinDate
)
)
)
```
formatString: #,0
measure 'НДС_20 по расходам, руб' = [Расходы МП + РК + СПП, руб] - [Расходы МП + РК + СПП, руб] / 1.2
formatString: #,0
measure 'Расходы к учетной сумме, %' =
VAR _MinDate = DATE(2025, 1, 1)
RETURN
CALCULATE(
VAR _Turnover =
SUM('mp оборот'[Сумма оборот МП, руб])
VAR _Sales =
[Сумма учетная, руб]
RETURN
DIVIDE(
_Turnover - _Sales,
_Turnover,
0
),
KEEPFILTERS(
FILTER(
'.Календарь',
'.Календарь'[Дата] >= _MinDate
)
)
)
annotation PBI_FormatHint = {"isGeneralNumber":true}
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 Организация
dataType: string
isHidden
summarizeBy: none
sourceColumn: Организация
changedProperty = IsHidden
annotation SummarizationSetBy = Automatic
column partner_id
dataType: string
isHidden
summarizeBy: none
sourceColumn: partner_id
changedProperty = IsHidden
annotation SummarizationSetBy = Automatic
column 'Сумма оборот МП, руб'
dataType: double
formatString: #,0
summarizeBy: sum
sourceColumn: Сумма оборот МП, руб
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}})
in
#"Измененный тип"
changedProperty = Name
annotation PBI_NavigationStepName = Навигация
annotation PBI_ResultType = Table