Forum Discussion

Thiagops's avatar
Thiagops
Helper II
3 years ago
Solved

Ambiguity 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)

- Customers (Related to outgoing invoice)

- Exit invoice

 

I'm using data tracking to choose the seller and the month, but I believe that because the customer table is not directly related to the calendar, it doesn't work. The result is not correct. I tried to relate the calendars table with the customers, but it says that it generates ambiguity with the outgoing invoice.

 

I'm using the following measure: 

New customer registration = DISTINCTCOUNTNOBLANK('CUSTOMER (WALLET)'[CLI_CODIGO])

  • tamerj1's avatar
    tamerj1
    3 years ago

    Thiagops 

    You are right. Please try

    Cadastro de NOVOS clientes2 =
    CALCULATE (
        DISTINCTCOUNTNOBLANK ( 'CLIENTE (CARTEIRA)'[CLI_CODIGO] ),
        'CLIENTE (CARTEIRA)'[Registration Date] IN VALUES ( CALENDARIO[Date] )
    )

12 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Thiagops 

    please provide screenshots of your data model (model view) and the visual that shows the wrong results 

    • Thiagops's avatar
      Thiagops
      Helper II

       

      Só funciona a seguimentação de dados para o vendedor.

      A seguimentação de dados para ano e mes não funciona.

       

       

      • tamerj1's avatar
        tamerj1
        Community Champion

        Thiagops 
        Please try

        New customer registration =
        CALCULATE (
            DISTINCTCOUNTNOBLANK ( 'CUSTOMER (WALLET)'[CLI_CODIGO] ),
            CROSSFILTER ( 'Calendar'[Date], 'Exit invoice'[Date], BOTH )
        )