Forum Discussion
Contagem veículos e clientes
Pessoal bom dia!
Tenho uma situação, em que preciso saber a quantidade de veículo e volume carregado em cada cliente. Porem as vezes 1 veiculo carrega 5 CRTs, nao relatório fincando 5 linhas(CRTs diferentes). Cada CRT é um exportador/Cliente.
Preciso criar uma medida para cada situacao, para saber a quantidade de veiculo e volume de veiculos carregado em cada cliente, notar que a mesma placa carrega em lugares diferentes.
Segue exemplo:
Desde ja agradeco pela ajuda.
- Anonymous2 years ago
Hi luciano1903 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
the number of vehicles = CALCULATE ( DISTINCTCOUNT ( 'Table'[VEICULO] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[CLIENTE] = MAX ( 'Table'[CLIENTE] ) ) )the volume of vehicles loaded at each customer = COUNTROWS ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[CLIENTE] = MAX ( 'Table'[CLIENTE] ) ) )(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
Hi luciano1903 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
the number of vehicles = CALCULATE ( DISTINCTCOUNT ( 'Table'[VEICULO] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[CLIENTE] = MAX ( 'Table'[CLIENTE] ) ) )the volume of vehicles loaded at each customer = COUNTROWS ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[CLIENTE] = MAX ( 'Table'[CLIENTE] ) ) )(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- luciano1903Frequent Visitor
Anonymous
Muito Obrigado pela ajuda.