Forum Discussion
Thiagops
Helper II
3 years agoAmbiguity when relating tables
Good morning, I need to know how many customers a seller registered in the month. I have the following tables: - Calendar (Related to outgoing invoice) - Sellers (related to customers) - Cust...
tamerj1
Community Champion
3 years agoThiagops
Please try
New customer registration =
CALCULATE (
DISTINCTCOUNTNOBLANK ( 'CUSTOMER (WALLET)'[CLI_CODIGO] ),
CROSSFILTER ( 'Calendar'[Date], 'Exit invoice'[Date], BOTH )
)Thiagops
Helper II
3 years agoStill the same result
- Thiagops3 years ago
Helper II
I also tried with USERELATIONSHIP, but it didn't work
- tamerj13 years ago
Community Champion
Apologies, that was a mistake. Please try
New customer registration =
CALCULATE (
DISTINCTCOUNTNOBLANK ( 'CUSTOMER (WALLET)'[CLI_CODIGO] ),
CROSSFILTER ( Customer[Customer Key], 'Exit invoice'[Customer Key], BOTH )
)- Thiagops3 years ago
Helper II
The result has changed as the data slices change, but still the values are wrong.
The tables CLIENTE (CARTEIRA) and NF_SAIDA (CARTEIRA) are related by column CLI_CODIGO does it interfere?
The code I used now was:
Cadastro de NOVOS clientes2 =
CALCULATE(
DISTINCTCOUNTNOBLANK('CLIENTE (CARTEIRA)'[CLI_CODIGO]),
CROSSFILTER('CLIENTE (CARTEIRA)'[CLI_CODIGO],'NF_SAIDA (CARTEIRA)'[CLI_CODIGO],Both))