Forum Discussion
h2danilo
7 years agoHelper I
COMPARATIVO CUSTO VENDEDOR X RENTABILIDADE
Bom dia, Estou precisando fazer um comparativo do custo do vendedor x Rentabilidade. Tenho uma planilha (Vendas) com as vendas realizadas onde tenho um campo que é o Lucro que teve na Venda e qua...
- 7 years ago
Hi h2danilo,
Try this formula as a measure, please.
Measure = SUMX ( SUMMARIZE ( 'BI_Venda', BI_Venda[Ano], BI_Venda[Cpf_Vendedor] ), CALCULATE ( MIN ( BI_Salario[Salario] ) * DISTINCTCOUNT ( BI_Venda[Mes] ) ) )
The "Cross filter direction" should be Both.
Best Regards,
v-jiascu-msft
7 years agoMicrosoft Employee
Hi h2danilo,
If you have proper relationships, try this measure, please.
Demo Measure = MIN ( 'Salarios'[Salario] ) * COUNTROWS ( 'Vendas' )
Best Regards,
- h2danilo7 years agoHelper I
Hi My friend,
This is my TablesCorrect WayPower BI
- brunofs1237 years agoFrequent Visitor
Check this DAX formula, as a "new table", and see if works:
newtable = SUMMARIZECOLUMNS('BI VENDA'[CPF];"lucro da venda";SUM('BI VENDA'[LUCRO DA VENDA]);"Valor venda"; SUM('BI VENDA'[VALOR VENDA]);"comissão venda";SUM('BI VENDA'[Comissão venda]);"salarios";MIN('BI SALARIO'[SALARIO]) * COUNTROWS('BI VENDA')) - v-jiascu-msft7 years agoMicrosoft Employee
Hi h2danilo,
Try this formula as a measure, please.
Measure = SUMX ( SUMMARIZE ( 'BI_Venda', BI_Venda[Ano], BI_Venda[Cpf_Vendedor] ), CALCULATE ( MIN ( BI_Salario[Salario] ) * DISTINCTCOUNT ( BI_Venda[Mes] ) ) )
The "Cross filter direction" should be Both.
Best Regards,
