cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

support value by visit frequency in basket analysis

Hi ,
 
I try to calulate the support value for my basket analysis.
I want to know which products the customers bought together, depending on how often they visited the store.
 
I have several columns:
Item1 and Item2, the customer ID and a rank column, which says how often they visited within one month.
 
Below is the DAX expression I tried to calculate this value, but I just get the overall support value, and not the support by rank
___________________________________________________________________________
support  =
var item1 = [Item1]
var item2 = [Item2]
var transactionWithItem1 =
SELECTCOLUMNS(FILTER(table, table[product] = item1), "customerID", [customerID], "rank",[rank])
var transactionWithItem2 =
SELECTCOLUMNS(FILTER(table, table[product] = item2), "customerID", [customerID], "rank",[rank])
var transactionWithBothItems = INTERSECT(transactionWithItem1, transactionWithItem2)
Return COUNTROWS(transactionWithBothItems) / DISTINCTCOUNT(table[customerID])
___________________________________________________________________________
 
thanks
3 REPLIES 3
Highlighted
Super User IV
Super User IV

Re: support value by visit frequency in basket analysis

Hi,

Share a simple dataset, explain the business logic and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Super User IV
Super User IV

Re: support value by visit frequency in basket analysis

Highlighted
Community Support
Community Support

Re: support value by visit frequency in basket analysis

Hi @nabe ,

 

Could you please share your sample data and expected result to me if you don't have any Confidential Information? Please upload your files to OneDrive for Business and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors