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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mostafatalaat37
New Member

Create Dax measure calculates number of occurrences of every pair of services purchased by clients

i want to create Dax measure that calculates number of occurrences of every pair of services purchased by clients 
- i have a table with 2 columns client name , service name
- i want to create a measure that shows the number every pair of services are purchased together 
- the output should look like the pic attached , where services names in rows and columns
where one service can't be purchased twice by the same client  ,
but service 1 and service 2 were purchased together one time by 1 client 
and service 2 and service 4 were purchased together 2 times  , ect

 

mostafatalaat37_0-1716324411838.png

 

1 REPLY 1
Anonymous
Not applicable

Hi  @mostafatalaat37 ,

 

According to your data, when Row=services2,Column=services1,the result is 3, when Row=services1,Column=services2,the result is 1, but there is only one column [services], not very clear about the logic, if it is convenient, can you explain the calculation logic and share the sample If it is convenient, can you explain the calculation logic and share the sample output in data and table format, or the pbix sample after removing the sensitive data. We can better understand the problem and help you out.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.