Forum Discussion

nirrobi's avatar
nirrobi
Icon for Helper V rankHelper V
8 years ago
Solved

Sales table with 2 CustomerID columns

Hi,

 

I have sales table with 2 customers column (actual + notify)

and client table - table below.

 

I need to show table with those 2 customers and the salesID + amount - table below.

 

I have 2 connection between the sales and customer table (nofity in active)

 

thanks in advenced.

 

 

 

SalesIDClientIDNotifyIDAmount

1001000100055
1011001100966
1021000100544
1031002100033
104100310102

 

 

And Customer table:

ClientIDClientName

1000AAA
1001BBB
1002CCC
1003DDD
1009EEE
1005FFF
1010GGG

 

I need to show one table as the one below:

SalesIDAmountClientNameNotifyName

10055AAAAAA
10166BBBEEE
10244AAAFFF
10333CCCAAA
1042DDDGGG

 

I have 2 connection between the sales and customer table (nofity in active)

4 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    HI nirrobi

     

    You can use these calculated columns

     

    ClientName =
    RELATED ( Customer[ClientName] )
    NotifyName =
    CALCULATE (
        VALUES ( Customer[ClientName] ),
        FILTER ( Customer , Customer[ClientID] = Sales[NotifyID] )
    )