cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
capko
Helper I
Helper I

Common elements, two tables

Hello,

 

I have two tables with three columns each: article reference, client and price. The first table correspond to the first year of the shop and the second one to the second year.

 

I would like to perform an analysis using these two tables. This analysis should be able to be performed as follows:

 

  • References bought by all clients on the first year
  • References bought by all clients on the second year
  • References bought by all clients both years

I will need to use a slicer in order to select 'Year 1', 'Year 2' or both at the same time and I will also add one another slice that should be allow me to select between 'Common/Not common' elements. I will also need to add a filter on the price (select only elements with price > x$).

 

The problem I'm facing is how to identify common elements. I cannot use an intersect because the common elements between the two tables will be depending on the client and reference...

 

Any idea on the approach for this problem ?

 

1 REPLY 1
danextian
Super User
Super User

Hi @capko ,

 

Looks like your use case is a candidate for basket analysis. There are a lot of blog posts out there tht tackles this topic and youtube videos as well. Each has a different approach but they do have common elements

https://blog.finance-bi.com/power-bi-basket-analysis/

https://www.daxpatterns.com/basket-analysis/

https://towardsdatascience.com/explore-the-potential-of-products-through-customers-purchase-behaviou...

https://businessintelligist.com/2021/03/08/market-basket-analysis-power-bi-dax-tutorial/

 

If none of those works, you might want to post a sample data as it is hard for anyone (not necessarily me) who wants to help to just use his/her imaginaton without any data to work on. In the past, I would post a link to an excel file in a cloud storage with formula/logic for my use case and have others convert it to Power BI logic.

On a side note, here's how you can get better/faster response to your post:

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/1447523/jump...






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors