Minhas práticas
Praticando medidas com Var e Return
Var % Faturamento =
Var Faturamento = SUMX(FactSales,FactSales[UnitPrice]*FactSales[Quantity])
Var Faturamento_All = SUMX(ALL(FactSales),FactSales[Quantity]*FactSales[UnitPrice])
RETURN
DIVIDE(Faturamento,Faturamento_All)
Var % crescimento =
Var Receita = sumx(FactSales,FactSales[Quantity]*FactSales[NetUnitPrice])
Var ReceitaLY = CALCULATE(SUMX(FactSales,FactSales[Quantity]*FactSales[NetUnitPrice]),SAMEPERIODLASTYEAR(dCalendario[Date]))
Return
DIVIDE(Receita-ReceitaLY,[Receita LY],0)
Var % Midwest =
Var Midwest = CALCULATE(SUM(FactSales[Revenue]),DimCustomer[Region]="Midwest")
var FaturamentoFixo = CALCULATE(SUM(FactSales[Revenue]),ALL(FactSales))
RETURN
DIVIDE(Midwest,FaturamentoFixo)
Var % Churn_Devolução =
var Devolucao = SUM(FactReturns[RefundAmount])
Var Faturamento = SUMX(FactSales,FactSales[Quantity]*FactSales[NetUnitPrice])
RETURN
DIVIDE(Devolucao,Faturamento,0)