cancel
Showing results for
Did you mean:
Highlighted
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

## 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
Highlighted
Super User IV

## Re: support value by visit frequency in basket analysis

@nabe , refer if these can help

My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Community Support

## Re: support value by visit frequency in basket analysis

Hi @nabe ,

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

Announcements

#### 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

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

#### Community Blog

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

#### Community Summit Australia – Join Online!

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

Top Solution Authors
Top Kudoed Authors