Forum Discussion

LeeSun's avatar
LeeSun
Frequent Visitor
3 years ago

DAX Solution: one source table and with a target tables. Identify the transactions differences

Need DAX solution to solve the below problem

Comparing one source table and two target tables. Identify the transactions difference between both directions and report them. All tables are associated with SVC_ID.

 

Need to generate table visuals, to show Transactions present in the Source table and not in target tables, and vice-versa. All comparisons are based on the SVC_ID. Please see the expected outcome for what I am looking for.

 

Much appreciate any solutions, I was able to do this in Power query using Left Anti join, looking for a solution using the DAX approach. 

 

Table1: Source

    

SVC_ID

TxnId

Targetsystem

Date

DispatchID

S1

1A

Alpha

5/15/2023

23

S1

1B

Beta

5/15/2023

24

S2

2A

Beta

5/15/2023

88

S3

3A

Beta

5/15/2023

89

S4

4A

Alpha

5/15/2023

54

S5

5A

Alpha

5/15/2023

66

 

Table2: Alpha

      

SVC_ID

TxnId

Targetsystem

Date

Svcreponse

SvCDesc

Comments

S1

1A

Alpha

5/15/2023

200

Good

Processed

S4

4A

Alpha

5/15/2023

500

Fail

reprocess

S6

6A

Alpha

5/15/2023

200

Good

Processed

 

Table3:  Beta

      

SVC_ID

TxnId

Targetsystem

Date

Svcreponse

SvCDesc

Ref-id

S1

1B

Beta

5/15/2023

200

Good

Az89

S7

7A

Beta

5/15/2023

500

Fail

Az890

S8

8A

Beta

5/15/2023

400

Fail

Az9278

 

Expected Outcome:

#1

 

Txns in Table1 (Source)but not in Table2(Alpha)
SVC_IDTxnIdDateDispatchID
55A5/15/202366

 

#2

Txns in Table2 (Alpha)but not in Table1(Source) 
SVC_IDTxnIdDateSvcreponseSvCDescComments
66A5/15/2023200GoodProcessed 

 

===============================================

#3

Txns in Table1 (Source)but not in Table3(Beta)
SVC_IDTxnIdDateDispatchID
22A5/15/202388
33A5/15/202389

 

#4

 

Txns in Table3 (beta)but not in Table1(Source) 
SVC_IDTxnIdDateSvcreponseSvCDescRef-id
77A5/15/2023500FailAz890
88A5/15/2023400FailAz9278