Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Asil
Frequent Visitor

Identifying sets of account combinations using DAX

Hi All,

 

I have a questions and hope you can help me. 

 

I have a transaction table and would like to identify the unique account combinations (I call it sets) and count the number of unique transactions for each set.

Transaction table.PNG


So the table above includes 3 different account sets:

  • Set 1 including AccountID 1200 and 8000
  • Set 2 including AccountID 6000 and 1300
  • Set 3 including AccountID 1400 and 800

 

The calculated table should be like:

Resulting table.PNG

 

Thanks in advance.

 

Regards,

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Asil,

 

Create a table by using the DAX below.

Table =
SUMMARIZE (
    'Transaction',
    'Transaction'[TransactionID],
    "ConcatAccountID", CONCATENATEX ( 'Transaction', 'Transaction'[AccountID], "&" )
)

Capture.PNG

 

Create a table by enter data
Capture1.PNG

Create a calculated column.

count =
CALCULATE (
    COUNT ( 'Table'[TransactionID] ),
    FILTER ( 'Table', 'Table'[ConcatAccountID] = Table1[AccountID] )
)

 

Capture2.PNG

 

Regards,

Charlie Liao

View solution in original post

2 REPLIES 2
v-caliao-msft
Microsoft Employee
Microsoft Employee

@Asil,

 

Create a table by using the DAX below.

Table =
SUMMARIZE (
    'Transaction',
    'Transaction'[TransactionID],
    "ConcatAccountID", CONCATENATEX ( 'Transaction', 'Transaction'[AccountID], "&" )
)

Capture.PNG

 

Create a table by enter data
Capture1.PNG

Create a calculated column.

count =
CALCULATE (
    COUNT ( 'Table'[TransactionID] ),
    FILTER ( 'Table', 'Table'[ConcatAccountID] = Table1[AccountID] )
)

 

Capture2.PNG

 

Regards,

Charlie Liao

Hi Charilie, 

 

Thank you for you reply. 

 

I was hoping to avoid using CONCATENATEX due to the performance issues when I try to analyse +1M transactions but I guess there are no other alternatives at the moment. The solution you provided works for me. I'm going to change it slightly and use SUMMARIZECOLUMN instead. 

 

Thanks again!

 

Regards,

Asil

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.